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 "pathitem.h"
|
||||||
|
|
||||||
|
#include <exception.h>
|
||||||
#include <nodeproperty.h>
|
#include <nodeproperty.h>
|
||||||
#include <variantproperty.h>
|
#include <variantproperty.h>
|
||||||
#include <nodelistproperty.h>
|
#include <nodelistproperty.h>
|
||||||
@@ -840,13 +841,17 @@ void PathItem::updatePathModelNodes(const QList<SelectionPoint> &changedPoints)
|
|||||||
{
|
{
|
||||||
PathUpdateDisabler pathUpdateDisabler(this, PathUpdateDisabler::DontUpdatePath);
|
PathUpdateDisabler pathUpdateDisabler(this, PathUpdateDisabler::DontUpdatePath);
|
||||||
|
|
||||||
RewriterTransaction rewriterTransaction =
|
try {
|
||||||
formEditorItem()->qmlItemNode().view()->beginRewriterTransaction(QByteArrayLiteral("PathItem::createCubicSegmentContextMenu"));
|
RewriterTransaction rewriterTransaction =
|
||||||
|
formEditorItem()->qmlItemNode().view()->beginRewriterTransaction(QByteArrayLiteral("PathItem::createCubicSegmentContextMenu"));
|
||||||
|
|
||||||
foreach (SelectionPoint changedPoint, changedPoints)
|
foreach (SelectionPoint changedPoint, changedPoints)
|
||||||
changedPoint.controlPoint.updateModelNode();
|
changedPoint.controlPoint.updateModelNode();
|
||||||
|
|
||||||
rewriterTransaction.commit();
|
rewriterTransaction.commit();
|
||||||
|
} catch (const Exception &e) {
|
||||||
|
e.showException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PathItem::disablePathUpdates()
|
void PathItem::disablePathUpdates()
|
||||||
|
Reference in New Issue
Block a user