From a381daa821bf5d6df089e665081c01ac3f959cdc Mon Sep 17 00:00:00 2001 From: easyw Date: Mon, 3 Jul 2017 18:02:36 +0200 Subject: [PATCH] updated CadQuery.Gui.Command for FC0.17 compatibility --- Gui/ImportCQ.py | 4 ++-- InitGui.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gui/ImportCQ.py b/Gui/ImportCQ.py index b79c377..005447c 100644 --- a/Gui/ImportCQ.py +++ b/Gui/ImportCQ.py @@ -16,9 +16,9 @@ def AutoExecute(self): """We should be able to pass the Gui.Commands.CadQueryExecuteScript function directly to the file_reloaded connect function, but that causes a segfault in FreeCAD. This function is a work-around for that. This function is passed to file_reloaded signal and in turn calls the CadQueryExecuteScript.Activated function.""" - import Gui.Command + import CadQuery.Gui.Command - Gui.Command.CadQueryExecuteScript().Activated() + CadQuery.Gui.Command.CadQueryExecuteScript().Activated() def open(filename): diff --git a/InitGui.py b/InitGui.py index 8cf0691..3dbd1a6 100644 --- a/InitGui.py +++ b/InitGui.py @@ -2,7 +2,7 @@ This adds a workbench with a scripting editor to FreeCAD's GUI.""" # (c) 2014-2016 Jeremy Wright Apache 2.0 License import FreeCAD, FreeCADGui -from Gui.Command import * +from CadQuery.Gui.Command import * import CadQuery_rc class CadQueryWorkbench (Workbench): @@ -36,7 +36,7 @@ class CadQueryWorkbench (Workbench): def Activated(self): import os import module_locator - from Gui import ImportCQ + from CadQuery.Gui import ImportCQ module_base_path = module_locator.module_path() @@ -74,9 +74,9 @@ class CadQueryWorkbench (Workbench): """We should be able to pass the Gui.Commands.CadQueryExecuteScript function directly to the file_reloaded connect function, but that causes a segfault in FreeCAD. This function is a work-around for that. This function is passed to file_reloaded signal and in turn calls the CadQueryExecuteScript.Activated function.""" - import Gui.Command + import CadQuery.Gui.Command - Gui.Command.CadQueryExecuteScript().Activated() + CadQuery.Gui.Command.CadQueryExecuteScript().Activated() def Deactivated(self): pass