TechDraw: add transactions to multiple commands (#22795)

* TechDraw: add transactions to multiple commands

* Feed each 'Create Dimension' option to the translation macro

* Call fixSceneDependencies when re-adding dimensions so that it shows up at the right place
This commit is contained in:
theo-vt
2025-08-18 11:46:15 -04:00
committed by GitHub
parent d8168d33f3
commit a94dc1463d
8 changed files with 49 additions and 1 deletions

View File

@@ -46,6 +46,8 @@ class TaskAddOffsetVertex():
self.view = view
self.vertex = vertex
App.setActiveTransaction("Add offset vertex")
def accept(self):
'''slot: OK pressed'''
point = self.vertex.Point # this is unscaled and inverted, but is also rotated.
@@ -59,6 +61,8 @@ class TaskAddOffsetVertex():
# uninverted relative value.
self.view.makeCosmeticVertex(point+offset)
Gui.Control.closeDialog()
App.closeActiveTransaction()
def reject(self):
App.closeActiveTransaction(True)
return True