From b5086172cc465a7f07462849da11978573061d3d Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 6 Jul 2023 14:03:59 +0200 Subject: [PATCH] Fix button states at startup When opening Qt Creator with clean settings, the run, debug and build actions build be in the wrong state (enabled instead of disabled, no debug icon). This happened because a ProjectExplorer::updateActions call was removed from the end of restoring the session at startup when moving the session handling to Core plugin. That updateActions call shouldn't be necesseray, and isn't if a session is loaded, even if it is the "implicit default", because then sessionLoaded(...) is emitted which results in the updateActions() call. The sessionLoaded(...) signal was not sent if the file for the default session does not exist. Fix that by also sending the signal even if no file was actually loaded. Amends cbeac777a61322fbc2d365c7b83ead8aaaaf4bbf Change-Id: Idb625253f29611e777d85f0feb6c196fae567ed0 Reviewed-by: Christian Kandeler --- src/plugins/coreplugin/session.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/coreplugin/session.cpp b/src/plugins/coreplugin/session.cpp index 7238a09a2ee..6b1723cf1e1 100644 --- a/src/plugins/coreplugin/session.cpp +++ b/src/plugins/coreplugin/session.cpp @@ -609,6 +609,7 @@ bool SessionManager::loadSession(const QString &session, bool initial) return true; } } else if (loadImplicitDefault) { + emit SessionManager::instance()->sessionLoaded(DEFAULT_SESSION); return true; }