Make all tabs closable; add tabs menu (#5451)

* make closeRequest call close by default

* make all tabs closable by default

* closeRequest instead of deleteLater on stop

* null out pointer on destroy

* no need to manually null out the tabs anymore

* comment

* pass tabsMenu into ctor

* comment

* implement tabs menu

* fix segfault on close (again)

* remove deck editor action from WindowMain
This commit is contained in:
RickyRister 2025-01-12 13:15:19 -08:00 committed by GitHub
parent e4611a8616
commit 9bd024d39f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 259 additions and 85 deletions

View file

@ -4,6 +4,7 @@
#include "./tab_supervisor.h"
#include <QApplication>
#include <QCloseEvent>
#include <QDebug>
#include <QScreen>
@ -42,3 +43,17 @@ void Tab::deleteCardInfoPopup(const QString &cardName)
}
}
}
/**
* Overrides the closeEvent in order to emit a close signal
*/
void Tab::closeEvent(QCloseEvent *event)
{
emit closed();
event->accept();
}
void Tab::closeRequest(bool /*forced*/)
{
close();
}