mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 00:54:53 -07:00
deck editor is tab, replay viewer is tab, deck editor shown by default, cache window geometry between sessions, 'open this deck in deck editor' open in game
This commit is contained in:
parent
3edecf98c3
commit
cc516823d7
13 changed files with 518 additions and 309 deletions
|
|
@ -56,7 +56,7 @@ void MainWindow::updateTabMenu(const QList<QMenu *> &newMenuList)
|
|||
menuBar()->removeAction(tabMenus[i]->menuAction());
|
||||
tabMenus = newMenuList;
|
||||
for (int i = 0; i < tabMenus.size(); ++i)
|
||||
menuBar()->insertMenu(tabMenus[i]->menuAction(), tabMenus[i]);
|
||||
menuBar()->insertMenu(helpMenu->menuAction(), tabMenus[i]);
|
||||
}
|
||||
|
||||
void MainWindow::processConnectionClosedEvent(const Event_ConnectionClosed &event)
|
||||
|
|
@ -175,8 +175,7 @@ void MainWindow::actWatchReplay()
|
|||
GameReplay *replay = new GameReplay;
|
||||
replay->ParseFromArray(buf.data(), buf.size());
|
||||
|
||||
TabGame *replayWatcher = new TabGame(0, replay);
|
||||
replayWatcher->show();
|
||||
tabSupervisor->openReplay(replay);
|
||||
}
|
||||
|
||||
void MainWindow::localGameEnded()
|
||||
|
|
@ -386,6 +385,8 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
retranslateUi();
|
||||
|
||||
resize(900, 700);
|
||||
restoreGeometry(settingsCache->getMainWindowGeometry());
|
||||
aFullScreen->setChecked(windowState() & Qt::WindowFullScreen);
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
|
|
@ -403,6 +404,7 @@ void MainWindow::closeEvent(QCloseEvent *event)
|
|||
}
|
||||
}
|
||||
event->accept();
|
||||
settingsCache->setMainWindowGeometry(saveGeometry());
|
||||
delete tabSupervisor;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue