From fc344d994822ba4b11aadcf0f4b38f7aec941b80 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Sun, 10 Feb 2019 01:40:48 -0800 Subject: [PATCH] reveal in project selects entire row instead of one cell --- panels/project.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/panels/project.cpp b/panels/project.cpp index 2180f6472..bc4f22bd1 100644 --- a/panels/project.cpp +++ b/panels/project.cpp @@ -831,7 +831,12 @@ bool Project::reveal_media(Media *media, QModelIndex parent) { } // select item - tree_view->selectionModel()->select(sorted_index, QItemSelectionModel::Select); + QItemSelection row_select( + sorter->index(sorted_index.row(), 0, sorted_index.parent()), + sorter->index(sorted_index.row(), sorter->columnCount()-1, sorted_index.parent()) + ); + + tree_view->selectionModel()->select(row_select, QItemSelectionModel::Select); } else if (config.project_view_type == PROJECT_VIEW_ICON) { icon_view->setRootIndex(hierarchy); icon_view->selectionModel()->select(sorted_index, QItemSelectionModel::Select);