diff --git a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp index 82c99635e3f..04cb420a035 100644 --- a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp +++ b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp @@ -230,6 +230,7 @@ void raise(const SelectionContext &selectionState) node.setVariantProperty("z", z); } } + transaction.commit(); } catch (const RewritingException &e) { //better save then sorry e.showException(); } @@ -251,6 +252,7 @@ void lower(const SelectionContext &selectionState) node.setVariantProperty("z", z); } } + transaction.commit(); } catch (const RewritingException &e) { //better save then sorry e.showException(); } @@ -333,6 +335,7 @@ void resetPosition(const SelectionContext &selectionState) node.removeProperty("x"); node.removeProperty("y"); } + transaction.commit(); } catch (const RewritingException &e) { //better save then sorry e.showException(); } @@ -663,6 +666,7 @@ void addSignalHandlerOrGotoImplementation(const SelectionContext &selectionState QmlObjectNode qmlObjectNode(modelNode); qmlObjectNode.ensureAliasExport(); + transaction.commit(); } catch (RewritingException &exception) { //better safe than sorry! There always might be cases where we fail exception.showException(); } diff --git a/src/plugins/qmldesigner/components/integration/designdocument.cpp b/src/plugins/qmldesigner/components/integration/designdocument.cpp index 74eabe6101d..3ae3235468e 100644 --- a/src/plugins/qmldesigner/components/integration/designdocument.cpp +++ b/src/plugins/qmldesigner/components/integration/designdocument.cpp @@ -373,6 +373,7 @@ void DesignDocument::deleteSelected() QmlObjectNode(node).destroy(); } + transaction.commit(); } catch (const RewritingException &e) { e.showException(); } @@ -536,6 +537,7 @@ void DesignDocument::paste() } view.setSelectedModelNodes(pastedNodeList); + transaction.commit(); } catch (const RewritingException &e) { qWarning() << e.description(); //silent error } @@ -574,6 +576,7 @@ void DesignDocument::paste() NodeMetaInfo::clearCache(); view.setSelectedModelNodes(QList() << pastedNode); + transaction.commit(); } catch (const RewritingException &e) { qWarning() << e.description(); //silent error } diff --git a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp index b0eba8d4c42..b7d79d54588 100644 --- a/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp +++ b/src/plugins/qmldesigner/components/navigator/navigatortreemodel.cpp @@ -717,6 +717,7 @@ void NavigatorTreeModel::moveNodesInteractive(NodeAbstractProperty &parentProper } } } + transaction.commit(); } catch (const RewritingException &exception) { //better safe than sorry! There always might be cases where we fail exception.showException(); } diff --git a/src/plugins/qmldesigner/designercore/model/modelmerger.cpp b/src/plugins/qmldesigner/designercore/model/modelmerger.cpp index 0c0af175f8c..35a3c548842 100644 --- a/src/plugins/qmldesigner/designercore/model/modelmerger.cpp +++ b/src/plugins/qmldesigner/designercore/model/modelmerger.cpp @@ -188,6 +188,8 @@ void ModelMerger::replaceModel(const ModelNode &modelNode) syncNodeProperties(rootNode, modelNode, idRenamingHash, view()); syncNodeListProperties(rootNode, modelNode, idRenamingHash, view()); m_view->changeRootNodeType(modelNode.type(), modelNode.majorVersion(), modelNode.minorVersion()); + + transaction.commit(); } catch (const RewritingException &e) { qWarning() << e.description(); //silent error }