forked from qt-creator/qt-creator
QmlDesigner: Fix usage of transaction
We have to update the model _inside_ the transaction of course. Without this patch the last changes were done after the transaction was already closed. Task-number: QDS-1194 Change-Id: I1061990f8b713ee5c25737b8eb173866fb495511 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
@@ -1225,8 +1225,6 @@ void NodeInstanceView::valuesModified(const ValuesModifiedCommand &command)
|
||||
|
||||
if (command.transactionOption == ValuesModifiedCommand::TransactionOption::Start)
|
||||
startPuppetTransaction();
|
||||
else if (command.transactionOption == ValuesModifiedCommand::TransactionOption::End)
|
||||
endPuppetTransaction();
|
||||
|
||||
for (const PropertyValueContainer &container : command.valueChanges()) {
|
||||
if (hasInstanceForId(container.instanceId())) {
|
||||
@@ -1239,6 +1237,9 @@ void NodeInstanceView::valuesModified(const ValuesModifiedCommand &command)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (command.transactionOption == ValuesModifiedCommand::TransactionOption::End)
|
||||
endPuppetTransaction();
|
||||
}
|
||||
|
||||
void NodeInstanceView::pixmapChanged(const PixmapChangedCommand &command)
|
||||
|
Reference in New Issue
Block a user