Place current deck-editor docks before restoring saved layouts [skip ci] (#7734)

This commit is contained in:
Bryce! 2026-11-03 22:37:25 -05:00 • committed by GitHub
parent c72192fd81
commit 7768416091
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -131,10 +131,16 @@ void TabDeckEditor::loadLayout()
LayoutsSettings &layouts = SettingsCache::instance().layouts();
auto layoutState = layouts.getDeckEditorLayoutState();
if (layoutState.isNull()) {
restartLayout();
} else {
restoreState(layoutState);
// Start with every current dock placed. Saved layouts from older versions
// cannot describe docks introduced later; restoreState leaves those docks
// in their existing positions while restoring the saved docks, including
// their visibility and floating state.
restartLayout();
if (!layoutState.isEmpty()) {
if (!restoreState(layoutState)) {
// A corrupt or incompatible state must not leave a partial layout.
restartLayout();
}
restoreGeometry(layouts.getDeckEditorGeometry());
}
}