mirror of https://github.com/CGAL/cgal
Use the sceneView->selectAll() instead of doing the selection by hand.
This commit is contained in:
parent
9aca6296d4
commit
645db67cea
|
|
@ -1337,6 +1337,8 @@ void MainWindow::selectSceneItem(int i)
|
|||
else {
|
||||
QItemSelection s =
|
||||
proxyModel->mapSelectionFromSource(scene->createSelection(i));
|
||||
if(s.empty())
|
||||
return;
|
||||
QModelIndex mi = proxyModel->mapFromSource(scene->getModelIndexFromId(i).first());
|
||||
sceneView->setCurrentIndex(mi);
|
||||
sceneView->selectionModel()->select(s,
|
||||
|
|
@ -1407,10 +1409,7 @@ void MainWindow::removeSceneItemFromSelection(int i)
|
|||
|
||||
void MainWindow::selectAll()
|
||||
{
|
||||
QItemSelection s =
|
||||
proxyModel->mapSelectionFromSource(scene->createSelectionAll());
|
||||
sceneView->selectionModel()->select(s,
|
||||
QItemSelectionModel::ClearAndSelect);
|
||||
sceneView->selectAll();
|
||||
}
|
||||
|
||||
int MainWindow::getSelectedSceneItemIndex() const
|
||||
|
|
|
|||
Loading…
Reference in New Issue