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)
|
||||
{
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue