updated CadQuery.Gui.Command for FC0.17 compatibility
This commit is contained in:
parent
456f520373
commit
a381daa821
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user