Preserve saved editor dock layouts
This commit is contained in:
@@ -194,7 +194,7 @@ bool Application::SwitchProject(const std::string& projectPath) {
|
||||
return false;
|
||||
}
|
||||
|
||||
m_imguiSession.SetProjectPath(projectPath);
|
||||
const bool hasSavedDockLayout = m_imguiSession.SetProjectPath(projectPath);
|
||||
m_editorContext->SetProjectPath(projectPath);
|
||||
|
||||
auto& logger = Debug::Logger::Get();
|
||||
@@ -208,6 +208,11 @@ bool Application::SwitchProject(const std::string& projectPath) {
|
||||
|
||||
m_lastWindowTitle.clear();
|
||||
UpdateWindowTitle();
|
||||
|
||||
if (!hasSavedDockLayout) {
|
||||
m_editorContext->GetEventBus().Publish(DockLayoutResetRequestedEvent{});
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user