ProjectWindow: Make switched-to project active again

This fixes a regression introduced in the recent ProjectWindow
reorganization and keeps the active project, the target selector
and the active item in the project combobox synchronized again.

Change-Id: If2baf4336d5da5d74f1cbf8ddc4e8cb056d49369
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2016-09-28 17:22:32 +02:00
parent 0935d14f16
commit a5e26753bf

View File

@@ -589,7 +589,8 @@ void ProjectWindow::startupProjectChanged(Project *project)
void ProjectWindow::projectSelected(int index)
{
m_selectorModel->rootItem()->setCurrentProject(index);
Project *project = m_selectorModel->rootItem()->childAt(index)->project();
SessionManager::setStartupProject(project);
}
void ProjectWindow::itemActivated(const QModelIndex &index)