Assembly: Create joint: prevent errors on undo/ctrl-Z
This commit is contained in:
@@ -59,7 +59,10 @@ def activateJoint(index):
|
||||
JointObject.activeTask.reject()
|
||||
|
||||
panel = TaskAssemblyCreateJoint(index)
|
||||
Gui.Control.showDialog(panel)
|
||||
dialog = Gui.Control.showDialog(panel)
|
||||
if dialog is not None:
|
||||
dialog.setAutoCloseOnTransactionChange(True)
|
||||
dialog.setDocumentName(App.ActiveDocument.Name)
|
||||
|
||||
|
||||
class CommandCreateJointFixed:
|
||||
|
||||
@@ -1383,6 +1383,9 @@ class TaskAssemblyCreateJoint(QtCore.QObject):
|
||||
self.joint.Visibility = self.visibilityBackup
|
||||
return True
|
||||
|
||||
def autoClosedOnTransactionChange(self):
|
||||
self.reject()
|
||||
|
||||
def deactivate(self):
|
||||
global activeTask
|
||||
activeTask = None
|
||||
|
||||
Reference in New Issue
Block a user