forked from qt-creator/qt-creator
SessionManager: set startup project on addProject
If there is no startup project when we add a new project the new project should become the startup project, as a situation where there are projects, but no startup project is invalid. removeProject also checks for the startupProject and adjusts it if necessary. Change-Id: I5f12add832db82af553fc1e393e32185eb322866 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -403,6 +403,9 @@ void SessionManager::addProject(Project *pro)
|
||||
configureEditors(pro);
|
||||
connect(pro, &Project::fileListChanged, [pro](){ configureEditors(pro); });
|
||||
connect(pro, &Project::displayNameChanged, pro, updateFolderNavigation);
|
||||
|
||||
if (!startupProject())
|
||||
setStartupProject(pro);
|
||||
}
|
||||
|
||||
void SessionManager::removeProject(Project *project)
|
||||
|
Reference in New Issue
Block a user