diff --git a/CadQuery/Gui/Command.py b/CadQuery/Gui/Command.py index d705961..906d33d 100644 --- a/CadQuery/Gui/Command.py +++ b/CadQuery/Gui/Command.py @@ -98,7 +98,6 @@ class CadQueryCloseScript: #Clear our script and whatever was rendered by it out cqCodePane.file.close() - cqCodePane.close() class CadQueryExecuteExample: exFile = None diff --git a/CadQuery/InitGui.py b/CadQuery/InitGui.py index a149eac..6e0ed31 100644 --- a/CadQuery/InitGui.py +++ b/CadQuery/InitGui.py @@ -185,6 +185,9 @@ class CadQueryWorkbench (Workbench): #Getting the main window will allow us to start setting things up the way we want mw = FreeCADGui.getMainWindow() + cqCodePane = mw.findChild(QtGui.QPlainTextEdit, "cqCodePane") + cqCodePane.close() + dockWidgets = mw.findChildren(QtGui.QDockWidget) for widget in dockWidgets: