Part: [skip ci] commit and open transaction when clicking Apply in Attachment dialog (Python version)

This commit is contained in:
wmayer
2020-03-23 13:06:38 +01:00
parent ffb802d72c
commit c32c9d5658

View File

@@ -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()