diff -r 3fea6bc1519b -r 0d42a1ebd954 src/mainwindow.cpp --- a/src/mainwindow.cpp Fri Mar 02 22:23:53 2018 +0200 +++ b/src/mainwindow.cpp Sat Mar 03 15:14:07 2018 +0200 @@ -1104,6 +1104,22 @@ m_selections[m_currentDocument]->clear(); } +void MainWindow::select(const QModelIndex &objectIndex) +{ + if (objectIndex.isValid() and objectIndex.model() == m_currentDocument) + m_selections[m_currentDocument]->select(objectIndex, QItemSelectionModel::Select); +} + +QItemSelectionModel* MainWindow::currentSelectionModel() +{ + return m_selections[m_currentDocument]; +} + +void MainWindow::replaceSelection(const QItemSelection& selection) +{ + m_selections[m_currentDocument]->select(selection, QItemSelectionModel::ClearAndSelect); +} + // --------------------------------------------------------------------------------------------------------------------- // ColorToolbarItem::ColorToolbarItem (LDColor color, QToolButton* toolButton) :