mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-19 00:42:14 -07:00
open deck editor tab first on startup
This commit is contained in:
parent
127b0ec5ae
commit
bcf2401530
2 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue