RecomputeLocker: make group command, for placing on global toolbar
This commit is contained in:
parent
5dc9981278
commit
4b2e2f2b33
|
@ -389,6 +389,23 @@ exportedCommands = [
|
||||||
"Lattice2_RecomputeLocker_RecomputeDocument",
|
"Lattice2_RecomputeLocker_RecomputeDocument",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
class CommandRecomputeGroup:
|
||||||
|
def GetCommands(self):
|
||||||
|
global exportedCommands
|
||||||
|
return tuple(exportedCommands)
|
||||||
|
|
||||||
|
def GetDefaultCommand(self): # return the index of the tuple of the default command.
|
||||||
|
return 0
|
||||||
|
|
||||||
|
def GetResources(self):
|
||||||
|
return { 'MenuText': 'Lattice recompute control:',
|
||||||
|
'ToolTip': 'Document recompute controlling tools from Lattice2 workbench'}
|
||||||
|
|
||||||
|
def IsActive(self): # optional
|
||||||
|
return App.ActiveDocument is not None
|
||||||
|
FreeCADGui.addCommand('Lattice2_RecomputeLockerGroup', CommandRecomputeGroup())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def msgbox(strmsg):
|
def msgbox(strmsg):
|
||||||
mb = QtGui.QMessageBox()
|
mb = QtGui.QMessageBox()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user