diff -r e1ced2523cad -r b6cbba6e29a1 src/document.cpp --- a/src/document.cpp Tue Nov 02 15:43:57 2021 +0200 +++ b/src/document.cpp Thu Mar 03 11:42:52 2022 +0200 @@ -57,7 +57,7 @@ QItemSelection selection; for (ldraw::id_t id : newSelection) { - QModelIndex index = this->model->lookup(id); + QModelIndex index = this->model->find(id); if (index != QModelIndex{}) { selection.select(index, index); @@ -70,7 +70,7 @@ connect(this->ui.listView->selectionModel(), &QItemSelectionModel::selectionChanged, [&](const QItemSelection& selected, const QItemSelection& deselected) { - auto resolveIndex = [this](const QModelIndex& index){ return this->model->resolve(index); }; + auto resolveIndex = [this](const QModelIndex& index){ return (*this->model)[index.row()]->id; }; auto resolve = [resolveIndex](const QItemSelection& selection) { return fn::map>(selection.indexes(), resolveIndex);