QmlDesigner: Catch exception

Change-Id: I22db80a0d6e7a1c95f6e77f584a177aaa78253bf
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Thomas Hartmann
2019-02-04 11:26:32 +01:00
parent d4726589f1
commit 2c583d6c98

View File

@@ -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()