diff --git a/src/plugins/qmldesigner/qmldesignerextension/pathtool/pathitem.cpp b/src/plugins/qmldesigner/qmldesignerextension/pathtool/pathitem.cpp index 0d5b380747d..ad5437f34e9 100644 --- a/src/plugins/qmldesigner/qmldesignerextension/pathtool/pathitem.cpp +++ b/src/plugins/qmldesigner/qmldesignerextension/pathtool/pathitem.cpp @@ -25,6 +25,7 @@ #include "pathitem.h" +#include #include #include #include @@ -840,13 +841,17 @@ void PathItem::updatePathModelNodes(const QList &changedPoints) { PathUpdateDisabler pathUpdateDisabler(this, PathUpdateDisabler::DontUpdatePath); - RewriterTransaction rewriterTransaction = - formEditorItem()->qmlItemNode().view()->beginRewriterTransaction(QByteArrayLiteral("PathItem::createCubicSegmentContextMenu")); + try { + RewriterTransaction rewriterTransaction = + formEditorItem()->qmlItemNode().view()->beginRewriterTransaction(QByteArrayLiteral("PathItem::createCubicSegmentContextMenu")); - foreach (SelectionPoint changedPoint, changedPoints) - changedPoint.controlPoint.updateModelNode(); + foreach (SelectionPoint changedPoint, changedPoints) + changedPoint.controlPoint.updateModelNode(); - rewriterTransaction.commit(); + rewriterTransaction.commit(); + } catch (const Exception &e) { + e.showException(); + } } void PathItem::disablePathUpdates()