From 4b2e2f2b330cd666a449dc8f4f8e020822e59d74 Mon Sep 17 00:00:00 2001 From: DeepSOIC Date: Mon, 4 Apr 2016 00:10:03 +0300 Subject: [PATCH] RecomputeLocker: make group command, for placing on global toolbar --- lattice2RecomputeLocker.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lattice2RecomputeLocker.py b/lattice2RecomputeLocker.py index d9c3eeb..b1173ad 100644 --- a/lattice2RecomputeLocker.py +++ b/lattice2RecomputeLocker.py @@ -389,6 +389,23 @@ exportedCommands = [ "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): mb = QtGui.QMessageBox()