diff --git a/src/Gui/propertyeditor/PropertyEditor.cpp b/src/Gui/propertyeditor/PropertyEditor.cpp index 413a4eb58f..4f029c895a 100644 --- a/src/Gui/propertyeditor/PropertyEditor.cpp +++ b/src/Gui/propertyeditor/PropertyEditor.cpp @@ -103,8 +103,15 @@ void PropertyEditor::closeEditor (QWidget * editor, QAbstractItemDelegate::EndEd { if (autoupdate) { App::Document* doc = App::GetApplication().getActiveDocument(); - if (doc && doc->isTouched()) - doc->recompute(); + if (doc) { + if (doc->isTouched()) { + doc->commitTransaction(); + doc->recompute(); + } + else { + doc->abortTransaction(); + } + } } QTreeView::closeEditor(editor, hint); } @@ -140,6 +147,13 @@ void PropertyEditor::currentChanged ( const QModelIndex & current, const QModelI void PropertyEditor::onItemActivated ( const QModelIndex & index ) { + if (autoupdate) { + PropertyItem* property = static_cast(index.internalPointer()); + QString edit = tr("Edit %1").arg(property->propertyName()); + App::Document* doc = App::GetApplication().getActiveDocument(); + if (doc) + doc->openTransaction(edit.toUtf8()); + } openPersistentEditor(model()->buddy(index)); }