forked from qt-creator/qt-creator
QmlDesigner: Do nothing if new and old index are the same
Change-Id: If552fad81479a4cd404d2d2966905eb9da8d479d Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -394,7 +394,8 @@ void NavigatorView::upButtonClicked()
|
||||
index--;
|
||||
if (index < 0)
|
||||
index = node.parentProperty().count() - 1; //wrap around
|
||||
node.parentProperty().toNodeListProperty().slide(oldIndex, index);
|
||||
if (oldIndex != index)
|
||||
node.parentProperty().toNodeListProperty().slide(oldIndex, index);
|
||||
}
|
||||
}
|
||||
updateItemSelection();
|
||||
@@ -411,7 +412,8 @@ void NavigatorView::downButtonClicked()
|
||||
index++;
|
||||
if (index >= node.parentProperty().count())
|
||||
index = 0; //wrap around
|
||||
node.parentProperty().toNodeListProperty().slide(oldIndex, index);
|
||||
if (oldIndex != index)
|
||||
node.parentProperty().toNodeListProperty().slide(oldIndex, index);
|
||||
}
|
||||
}
|
||||
updateItemSelection();
|
||||
|
Reference in New Issue
Block a user