forked from qt-creator/qt-creator
QmlDesigner: Catch exception
Change-Id: I22db80a0d6e7a1c95f6e77f584a177aaa78253bf Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
|
||||
#include "pathitem.h"
|
||||
|
||||
#include <exception.h>
|
||||
#include <nodeproperty.h>
|
||||
#include <variantproperty.h>
|
||||
#include <nodelistproperty.h>
|
||||
@@ -840,13 +841,17 @@ void PathItem::updatePathModelNodes(const QList<SelectionPoint> &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()
|
||||
|
Reference in New Issue
Block a user