mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-01 02:53:56 -07:00
Workaround for duplicated dialogs on close
This commit is contained in:
parent
399d4bf516
commit
061fd5a830
1 changed files with 7 additions and 0 deletions
|
|
@ -423,9 +423,16 @@ MainWindow::~MainWindow()
|
||||||
|
|
||||||
void MainWindow::closeEvent(QCloseEvent *event)
|
void MainWindow::closeEvent(QCloseEvent *event)
|
||||||
{
|
{
|
||||||
|
// workaround Qt bug where closeEvent gets called twice
|
||||||
|
static bool bClosingDown=false;
|
||||||
|
if(bClosingDown)
|
||||||
|
return;
|
||||||
|
bClosingDown=true;
|
||||||
|
|
||||||
if (!tabSupervisor->closeRequest())
|
if (!tabSupervisor->closeRequest())
|
||||||
{
|
{
|
||||||
event->ignore();
|
event->ignore();
|
||||||
|
bClosingDown=false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue