Workaround for duplicated dialogs on close

This commit is contained in:
Fabio Bas 2015-02-25 18:32:33 +01:00
parent 399d4bf516
commit 061fd5a830

View file

@ -423,9 +423,16 @@ MainWindow::~MainWindow()
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())
{
event->ignore();
bClosingDown=false;
return;
}