Path: Fix automatic commitTransaction() calls, issue #6149 [Bug]
This commit removes the automatic committal of transactions when activated with GUI command. The committal of the transaction is executed with the `accept()` and `reject()` methods of the respective task panel.
This commit is contained in:
@@ -317,7 +317,7 @@ class CommandPathDressup:
|
||||
"Gui.ActiveDocument.getObject(base.Name).Visibility = False"
|
||||
)
|
||||
FreeCADGui.doCommand("obj.ViewObject.Document.setEdit(obj.ViewObject, 0)")
|
||||
FreeCAD.ActiveDocument.commitTransaction()
|
||||
# FreeCAD.ActiveDocument.commitTransaction() # Final `commitTransaction()` called via TaskPanel.accept()
|
||||
FreeCAD.ActiveDocument.recompute()
|
||||
|
||||
|
||||
|
||||
@@ -1400,7 +1400,7 @@ class CommandDressupDogbone(object):
|
||||
"PathScripts.PathDressupDogbone.Create(FreeCAD.ActiveDocument.%s)"
|
||||
% baseObject.Name
|
||||
)
|
||||
FreeCAD.ActiveDocument.commitTransaction()
|
||||
# FreeCAD.ActiveDocument.commitTransaction() # Final `commitTransaction()` called via TaskPanel.accept()
|
||||
FreeCAD.ActiveDocument.recompute()
|
||||
|
||||
|
||||
|
||||
@@ -660,7 +660,7 @@ class CommandDressupDragknife:
|
||||
FreeCADGui.doCommand("obj.pivotheight = 4")
|
||||
FreeCADGui.doCommand("obj.ViewObject.Document.setEdit(obj.ViewObject, 0)")
|
||||
|
||||
FreeCAD.ActiveDocument.commitTransaction()
|
||||
# FreeCAD.ActiveDocument.commitTransaction() # Final `commitTransaction()` called via TaskPanel.accept()
|
||||
FreeCAD.ActiveDocument.recompute()
|
||||
|
||||
|
||||
|
||||
@@ -732,7 +732,7 @@ class CommandPathDressupLeadInOut:
|
||||
FreeCADGui.doCommand(
|
||||
"Gui.ActiveDocument.getObject(base.Name).Visibility = False"
|
||||
)
|
||||
FreeCAD.ActiveDocument.commitTransaction()
|
||||
# FreeCAD.ActiveDocument.commitTransaction() # Final `commitTransaction()` called via TaskPanel.accept()
|
||||
FreeCAD.ActiveDocument.recompute()
|
||||
|
||||
|
||||
|
||||
@@ -294,7 +294,7 @@ class CommandPathDressupPathBoundary:
|
||||
"PathScripts.PathDressupPathBoundaryGui.Create(App.ActiveDocument.%s)"
|
||||
% baseObject.Name
|
||||
)
|
||||
FreeCAD.ActiveDocument.commitTransaction()
|
||||
# FreeCAD.ActiveDocument.commitTransaction() # Final `commitTransaction()` called via TaskPanel.accept()
|
||||
FreeCAD.ActiveDocument.recompute()
|
||||
|
||||
|
||||
|
||||
@@ -956,7 +956,7 @@ class CommandPathDressupRampEntry:
|
||||
"Gui.ActiveDocument.getObject(base.Name).Visibility = False"
|
||||
)
|
||||
FreeCADGui.doCommand("dbo.setup(obj)")
|
||||
FreeCAD.ActiveDocument.commitTransaction()
|
||||
# FreeCAD.ActiveDocument.commitTransaction() # Final `commitTransaction()` called via TaskPanel.accept()
|
||||
FreeCAD.ActiveDocument.recompute()
|
||||
|
||||
|
||||
|
||||
@@ -593,7 +593,7 @@ class CommandPathDressupTag:
|
||||
"PathScripts.PathDressupTagGui.Create(App.ActiveDocument.%s)"
|
||||
% baseObject.Name
|
||||
)
|
||||
FreeCAD.ActiveDocument.commitTransaction()
|
||||
# FreeCAD.ActiveDocument.commitTransaction() # Final `commitTransaction()` called via TaskPanel.accept()
|
||||
FreeCAD.ActiveDocument.recompute()
|
||||
|
||||
|
||||
|
||||
@@ -396,7 +396,7 @@ class CommandPathDressup:
|
||||
"Gui.ActiveDocument.getObject(obj.Base.Name).Visibility = False"
|
||||
)
|
||||
FreeCADGui.doCommand("obj.ViewObject.Document.setEdit(obj.ViewObject, 0)")
|
||||
FreeCAD.ActiveDocument.commitTransaction()
|
||||
# FreeCAD.ActiveDocument.commitTransaction() # Final `commitTransaction()` called via TaskPanel.accept()
|
||||
FreeCAD.ActiveDocument.recompute()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user