open deck editor tab first on startup

This commit is contained in:
RickyRister 2025-01-13 08:00:06 -08:00
parent 127b0ec5ae
commit bcf2401530
2 changed files with 3 additions and 1 deletions

View file

@ -166,6 +166,8 @@ TabSupervisor::TabSupervisor(AbstractClient *_client, QMenu *tabsMenu, QWidget *
retranslateUi();
// open always-available tabs on startup
addDeckEditorTab(nullptr);
aTabVisualDeckStorage->setChecked(SettingsCache::instance().getVisualDeckStorageShowOnLoad());
}
@ -402,6 +404,7 @@ void TabSupervisor::actTabVisualDeckStorage(bool checked)
if (checked && !tabVisualDeckStorage) {
tabVisualDeckStorage = new TabDeckStorageVisual(this, client);
myAddTab(tabVisualDeckStorage);
setCurrentWidget(tabVisualDeckStorage);
connect(tabVisualDeckStorage, &Tab::closed, this, [this] {
tabVisualDeckStorage = nullptr;
aTabVisualDeckStorage->setChecked(false);

View file

@ -860,7 +860,6 @@ MainWindow::MainWindow(QWidget *parent)
connect(tabSupervisor, &TabSupervisor::setMenu, this, &MainWindow::updateTabMenu);
connect(tabSupervisor, &TabSupervisor::localGameEnded, this, &MainWindow::localGameEnded);
connect(tabSupervisor, &TabSupervisor::showWindowIfHidden, this, &MainWindow::showWindowIfHidden);
tabSupervisor->addDeckEditorTab(nullptr);
setCentralWidget(tabSupervisor);