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--;
|
index--;
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
index = node.parentProperty().count() - 1; //wrap around
|
index = node.parentProperty().count() - 1; //wrap around
|
||||||
node.parentProperty().toNodeListProperty().slide(oldIndex, index);
|
if (oldIndex != index)
|
||||||
|
node.parentProperty().toNodeListProperty().slide(oldIndex, index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
updateItemSelection();
|
updateItemSelection();
|
||||||
@@ -411,7 +412,8 @@ void NavigatorView::downButtonClicked()
|
|||||||
index++;
|
index++;
|
||||||
if (index >= node.parentProperty().count())
|
if (index >= node.parentProperty().count())
|
||||||
index = 0; //wrap around
|
index = 0; //wrap around
|
||||||
node.parentProperty().toNodeListProperty().slide(oldIndex, index);
|
if (oldIndex != index)
|
||||||
|
node.parentProperty().toNodeListProperty().slide(oldIndex, index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
updateItemSelection();
|
updateItemSelection();
|
||||||
|
Reference in New Issue
Block a user