fixes 0003341: Undoing is missing steps
This commit is contained in:
@@ -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<PropertyItem*>(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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user