diff --git a/CadQuery/Gui/Command.py b/CadQuery/Gui/Command.py index db53205..04725a7 100644 --- a/CadQuery/Gui/Command.py +++ b/CadQuery/Gui/Command.py @@ -110,24 +110,21 @@ class CadQueryExecuteExample: module_base_path = module_locator.module_path() exs_dir_path = os.path.join(module_base_path, 'Examples') - #We need to close any file that's already open in the editor window - # CadQueryCloseScript().Activated() - #Append this script's directory to sys.path sys.path.append(os.path.dirname(exs_dir_path)) #We've created a library that FreeCAD can use as well to open CQ files ImportCQ.open(os.path.join(exs_dir_path, self.exFile)) - docname = os.path.splitext(os.path.basename(self.exFile))[0] - FreeCAD.newDocument(docname) + # docname = os.path.splitext(os.path.basename(self.exFile))[0] + # FreeCAD.newDocument(docname) #Execute the script - CadQueryExecuteScript().Activated() + #CadQueryExecuteScript().Activated() #Get a nice view of our model - FreeCADGui.activeDocument().activeView().viewAxometric() - FreeCADGui.SendMsgToActiveView("ViewFit") + #FreeCADGui.activeDocument().activeView().viewAxometric() + #FreeCADGui.SendMsgToActiveView("ViewFit") class CadQueryExecuteScript: @@ -243,15 +240,15 @@ class CadQueryOpenScript: #We've created a library that FreeCAD can use as well to open CQ files ImportCQ.open(filename[0]) - docname = os.path.splitext(os.path.basename(filename[0]))[0] - FreeCAD.newDocument(docname) + # docname = os.path.splitext(os.path.basename(filename[0]))[0] + # FreeCAD.newDocument(docname) #Execute the script - CadQueryExecuteScript().Activated() + # CadQueryExecuteScript().Activated() #Get a nice view of our model - FreeCADGui.activeDocument().activeView().viewAxometric() - FreeCADGui.SendMsgToActiveView("ViewFit") + # FreeCADGui.activeDocument().activeView().viewAxometric() + # FreeCADGui.SendMsgToActiveView("ViewFit") class CadQuerySaveScript: diff --git a/CadQuery/Shared.py b/CadQuery/Shared.py index cd220a0..dc413be 100644 --- a/CadQuery/Shared.py +++ b/CadQuery/Shared.py @@ -37,7 +37,6 @@ def getActiveCodePane(): subList = mdi.subWindowList() for sub in subList: - print(sub.windowTitle()) if sub.windowTitle() == mdiWin.windowTitle().split(" ")[0] + ".py": mdiWin = sub