From c32c9d5658a400b347b061e9bf7f49f4875a8ee4 Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 23 Mar 2020 13:06:38 +0100 Subject: [PATCH] Part: [skip ci] commit and open transaction when clicking Apply in Attachment dialog (Python version) --- src/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py b/src/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py index e11864b86e..ddb8a77f37 100644 --- a/src/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py +++ b/src/Mod/Part/AttachmentEditor/TaskAttachmentEditor.py @@ -301,6 +301,9 @@ class AttachmentEditorTaskPanel(FrozenClass): if button == QtGui.QDialogButtonBox.Apply: if self.obj_is_attachable: self.writeParameters() + if self.create_transaction: + self.obj.Document.commitTransaction() + self.obj.Document.openTransaction(_translate('AttachmentEditor',"Edit attachment of {feat}",None).format(feat= self.obj.Name)) self.updatePreview() if self.callback_Apply: self.callback_Apply()