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:
parent
26d1fcc944
commit
7903cd520a
1 changed files with 8 additions and 3 deletions
|
@ -559,8 +559,13 @@ void TabDeckEditor::refreshShortcuts()
|
||||||
void TabDeckEditor::loadLayout()
|
void TabDeckEditor::loadLayout()
|
||||||
{
|
{
|
||||||
LayoutsSettings &layouts = SettingsCache::instance().layouts();
|
LayoutsSettings &layouts = SettingsCache::instance().layouts();
|
||||||
restoreState(layouts.getDeckEditorLayoutState());
|
auto &layoutState = layouts.getDeckEditorLayoutState();
|
||||||
restoreGeometry(layouts.getDeckEditorGeometry());
|
if (layoutState.isNull()) {
|
||||||
|
restartLayout();
|
||||||
|
} else {
|
||||||
|
restoreState(layoutState);
|
||||||
|
restoreGeometry(layouts.getDeckEditorGeometry());
|
||||||
|
}
|
||||||
|
|
||||||
aCardInfoDockVisible->setChecked(cardInfoDock->isVisible());
|
aCardInfoDockVisible->setChecked(cardInfoDock->isVisible());
|
||||||
aFilterDockVisible->setChecked(filterDock->isVisible());
|
aFilterDockVisible->setChecked(filterDock->isVisible());
|
||||||
|
@ -605,7 +610,7 @@ TabDeckEditor::TabDeckEditor(TabSupervisor *_tabSupervisor, QWidget *parent)
|
||||||
connect(&SettingsCache::instance().shortcuts(), SIGNAL(shortCutChanged()), this, SLOT(refreshShortcuts()));
|
connect(&SettingsCache::instance().shortcuts(), SIGNAL(shortCutChanged()), this, SLOT(refreshShortcuts()));
|
||||||
refreshShortcuts();
|
refreshShortcuts();
|
||||||
|
|
||||||
QTimer::singleShot(0, this, SLOT(loadLayout()));
|
loadLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
TabDeckEditor::~TabDeckEditor()
|
TabDeckEditor::~TabDeckEditor()
|
||||||
|
|
Loading…
Reference in a new issue