Draft: move PathLinkArray GuiCommand to gui_patharray module

This commit is contained in:
vocx-fc
2020-04-10 00:03:00 -05:00
committed by Yorik van Havre
parent 23a975250f
commit 539e36dd72
2 changed files with 27 additions and 12 deletions

View File

@@ -109,3 +109,29 @@ class PathArray(gui_base_original.Modifier):
Gui.addCommand('Draft_PathArray', PathArray())
class PathLinkArray(PathArray):
"""Gui Command for the PathLinkArray tool based on the PathArray tool."""
def __init__(self):
super().__init__(use_link=True)
def GetResources(self):
"""Set icon, menu and tooltip."""
_menu = "Path Link array"
_tip = ("Like the PathArray tool, but creates a 'Link array' "
"instead.\n"
"A 'Link array' is more efficient when handling many copies "
"but the 'Fuse' option cannot be used.")
return {'Pixmap': 'Draft_PathLinkArray',
'MenuText': QT_TRANSLATE_NOOP("Draft_PathLinkArray", _menu),
'ToolTip': QT_TRANSLATE_NOOP("Draft_PathLinkArray", _tip)}
def Activated(self):
"""Execute when the command is called."""
super().Activated(name=_tr("Link path array"))
Gui.addCommand('Draft_PathLinkArray', PathLinkArray())