diff --git a/src/plugins/qmldesigner/components/navigator/navigatorview.cpp b/src/plugins/qmldesigner/components/navigator/navigatorview.cpp index 5fa18097202..b0e9aa386c1 100644 --- a/src/plugins/qmldesigner/components/navigator/navigatorview.cpp +++ b/src/plugins/qmldesigner/components/navigator/navigatorview.cpp @@ -67,8 +67,13 @@ inline static void moveNodesUp(const QList &nodes) index--; if (index < 0) index = node.parentProperty().count() - 1; //wrap around - if (oldIndex != index) - node.parentProperty().toNodeListProperty().slide(oldIndex, index); + if (oldIndex != index) { + try { + node.parentProperty().toNodeListProperty().slide(oldIndex, index); + } catch (QmlDesigner::Exception &exception) { + exception.showException(); + } + } } } } @@ -82,8 +87,13 @@ inline static void moveNodesDown(const QList &nodes) index++; if (index >= node.parentProperty().count()) index = 0; //wrap around - if (oldIndex != index) - node.parentProperty().toNodeListProperty().slide(oldIndex, index); + if (oldIndex != index) { + try { + node.parentProperty().toNodeListProperty().slide(oldIndex, index); + } catch (QmlDesigner::Exception &exception) { + exception.showException(); + } + } } } }