mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-01-27 15:24:29 -08:00
perform restartLayout conditionally (#4513)
* Revert "Fixed layout on Deck Editor not using last layout. It was reseting layout on ctor. (#4420)"
This reverts commit 3bc90003b3.
* restart layout on fresh installs
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user