Draft: small changes to the loading of the array modules
This commit is contained in:
@@ -117,9 +117,13 @@ SET(Modifier_tools
|
||||
draftguitools/gui_wire2spline.py
|
||||
draftguitools/gui_shape2dview.py
|
||||
draftguitools/gui_draft2sketch.py
|
||||
draftguitools/gui_arrays.py
|
||||
draftguitools/gui_array_simple.py
|
||||
draftguitools/gui_circulararray.py
|
||||
draftguitools/gui_orthoarray.py
|
||||
draftguitools/gui_patharray.py
|
||||
draftguitools/gui_pointarray.py
|
||||
draftguitools/gui_polararray.py
|
||||
)
|
||||
|
||||
SET(Draft_GUI_tools
|
||||
@@ -128,12 +132,8 @@ SET(Draft_GUI_tools
|
||||
draftguitools/gui_base.py
|
||||
draftguitools/gui_base_original.py
|
||||
draftguitools/gui_tool_utils.py
|
||||
draftguitools/gui_circulararray.py
|
||||
draftguitools/gui_orthoarray.py
|
||||
draftguitools/gui_polararray.py
|
||||
draftguitools/gui_planeproxy.py
|
||||
draftguitools/gui_selectplane.py
|
||||
draftguitools/gui_arrays.py
|
||||
draftguitools/gui_snaps.py
|
||||
draftguitools/gui_snapper.py
|
||||
draftguitools/gui_trackers.py
|
||||
|
||||
@@ -193,6 +193,7 @@ from draftguitools.gui_array_simple import LinkArray
|
||||
from draftguitools.gui_patharray import PathArray
|
||||
from draftguitools.gui_patharray import PathLinkArray
|
||||
from draftguitools.gui_pointarray import PointArray
|
||||
import draftguitools.gui_arrays
|
||||
|
||||
|
||||
class Draft_Clone(Modifier):
|
||||
|
||||
@@ -24,23 +24,27 @@
|
||||
## @package gui_arrays
|
||||
# \ingroup DRAFT
|
||||
# \brief Provide the Draft ArrayTools command to group the other array tools.
|
||||
|
||||
from PySide.QtCore import QT_TRANSLATE_NOOP
|
||||
|
||||
import FreeCAD as App
|
||||
import FreeCADGui as Gui
|
||||
import Draft_rc
|
||||
import draftguitools.gui_circulararray
|
||||
import draftguitools.gui_polararray
|
||||
import draftguitools.gui_orthoarray
|
||||
import draftguitools.gui_patharray
|
||||
import draftguitools.gui_pointarray
|
||||
import draftguitools.gui_polararray
|
||||
|
||||
# The module is used to prevent complaints from code checkers (flake8)
|
||||
True if Draft_rc.__name__ else False
|
||||
True if draftguitools.gui_circulararray.__name__ else False
|
||||
True if draftguitools.gui_polararray.__name__ else False
|
||||
True if draftguitools.gui_orthoarray.__name__ else False
|
||||
bool(Draft_rc.__name__)
|
||||
bool(draftguitools.gui_circulararray.__name__)
|
||||
bool(draftguitools.gui_orthoarray.__name__)
|
||||
bool(draftguitools.gui_patharray.__name__)
|
||||
bool(draftguitools.gui_pointarray.__name__)
|
||||
bool(draftguitools.gui_polararray.__name__)
|
||||
|
||||
|
||||
class ArrayGroupCommand:
|
||||
class ArrayGroup:
|
||||
"""Gui command for the group of array tools."""
|
||||
|
||||
def GetCommands(self):
|
||||
@@ -62,10 +66,10 @@ class ArrayGroupCommand:
|
||||
|
||||
def IsActive(self):
|
||||
"""Return True when this command should be available."""
|
||||
if App.activeDocument():
|
||||
if Gui.activeDocument():
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
Gui.addCommand('Draft_ArrayTools', ArrayGroupCommand())
|
||||
Gui.addCommand('Draft_ArrayTools', ArrayGroup())
|
||||
|
||||
Reference in New Issue
Block a user