diff --git a/Polyhedron/demo/Polyhedron/MainWindow.cpp b/Polyhedron/demo/Polyhedron/MainWindow.cpp index 226aab568ab..a65998b825f 100644 --- a/Polyhedron/demo/Polyhedron/MainWindow.cpp +++ b/Polyhedron/demo/Polyhedron/MainWindow.cpp @@ -1069,7 +1069,7 @@ void MainWindow::selectSceneItem(int i) proxyModel->mapSelectionFromSource(scene->createSelection(i)); sceneView->selectionModel()->select(s, - QItemSelectionModel::Select); + QItemSelectionModel::ClearAndSelect); } } diff --git a/Polyhedron/demo/Polyhedron/Scene.h b/Polyhedron/demo/Polyhedron/Scene.h index 8b31c645fdc..1ee894b50b4 100644 --- a/Polyhedron/demo/Polyhedron/Scene.h +++ b/Polyhedron/demo/Polyhedron/Scene.h @@ -184,9 +184,8 @@ public Q_SLOTS: void setSelectedItemIndex(int i) { selected_item = i; - Q_EMIT selectionChanged(i); } - //! Same as setSelectedItemIndex. + //! Clears the current selection then sets the selected item to the target index. void setSelectedItem(int i ) { selected_item = i;