mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 00:24:47 -07:00
cockatrice: ask to save modified decks on close; fix #759
This commit is contained in:
parent
06e5327595
commit
399d4bf516
5 changed files with 26 additions and 6 deletions
|
|
@ -423,12 +423,12 @@ MainWindow::~MainWindow()
|
|||
|
||||
void MainWindow::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
if (tabSupervisor->getGameCount()) {
|
||||
if (QMessageBox::question(this, tr("Are you sure?"), tr("There are still open games. Are you sure you want to quit?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::No) {
|
||||
event->ignore();
|
||||
return;
|
||||
}
|
||||
if (!tabSupervisor->closeRequest())
|
||||
{
|
||||
event->ignore();
|
||||
return;
|
||||
}
|
||||
|
||||
event->accept();
|
||||
settingsCache->setMainWindowGeometry(saveGeometry());
|
||||
tabSupervisor->deleteLater();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue