forked from qt-creator/qt-creator
Fix project tree's "synchronize with editor"
When for example closing all editors, the selection in the project tree is removed, but after re-opening the previously selected file, the selection was still missing. Qt item views differentiate between "current" item and "selection". The code uses the "current" item for tracking, but when clearing the selection in the project tree, the code did not "clear" the "current" item. Change-Id: I182c7b78bf8dcc51af71e860ac620310d472b7b5 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -512,6 +512,7 @@ void ProjectTreeWidget::setCurrentItem(Node *node)
|
||||
}
|
||||
} else {
|
||||
m_view->clearSelection();
|
||||
m_view->setCurrentIndex({});
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user