diff --git a/cockatrice/src/tab_deck_editor.cpp b/cockatrice/src/tab_deck_editor.cpp index c145bef2..eb403415 100644 --- a/cockatrice/src/tab_deck_editor.cpp +++ b/cockatrice/src/tab_deck_editor.cpp @@ -559,8 +559,13 @@ void TabDeckEditor::refreshShortcuts() void TabDeckEditor::loadLayout() { LayoutsSettings &layouts = SettingsCache::instance().layouts(); - restoreState(layouts.getDeckEditorLayoutState()); - restoreGeometry(layouts.getDeckEditorGeometry()); + auto &layoutState = layouts.getDeckEditorLayoutState(); + if (layoutState.isNull()) { + restartLayout(); + } else { + restoreState(layoutState); + restoreGeometry(layouts.getDeckEditorGeometry()); + } aCardInfoDockVisible->setChecked(cardInfoDock->isVisible()); aFilterDockVisible->setChecked(filterDock->isVisible()); @@ -605,7 +610,7 @@ TabDeckEditor::TabDeckEditor(TabSupervisor *_tabSupervisor, QWidget *parent) connect(&SettingsCache::instance().shortcuts(), SIGNAL(shortCutChanged()), this, SLOT(refreshShortcuts())); refreshShortcuts(); - QTimer::singleShot(0, this, SLOT(loadLayout())); + loadLayout(); } TabDeckEditor::~TabDeckEditor()