Code: Select all
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython", "Hatch"
Code: Select all
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython", "Hatch"
I have an existing PR (I would not call it big though) and I'll integrate your suggestion in that PR. Thanks again.
Code: Select all
def setupContextMenu(self, vobj, menu):
action1 = QtGui.QAction(Gui.getIcon("Std_TransformManip.svg"),
translate("Command", "Transform"), # Context `Command` instead of `draft`.
menu)
QtCore.QObject.connect(action1,
QtCore.SIGNAL("triggered()"),
self.transform)
menu.addAction(action1)
return True # Removes `Transform` and `Set colors` from the default
# Part::FeaturePython context menu.
def transform(self):
Gui.runCommand("Std_TransformManip", 0)
I think that's the correct way.
Great. I'll close my PR soon then.I have an existing PR (I would not call it big though) and I'll integrate your suggestion in that PR.