Skip to content

Commit

Permalink
Delete all WizardViews on close of MainWindow, so they don't stay ope…
Browse files Browse the repository at this point in the history
…n after closing EMStudio
  • Loading branch information
malcom2073 committed Jan 8, 2014
1 parent 114bbb5 commit 29e70a7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core/src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,8 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)

windowsettings.endGroup();

this->setAttribute(Qt::WA_DeleteOnClose,true);


}
void MainWindow::menu_windows_interrogateProgressViewClicked()
Expand Down Expand Up @@ -1964,6 +1966,14 @@ MainWindow::~MainWindow()
windowsettings.endGroup();
windowsettings.sync();

//Remove all WizardView windows
for (int i=0;i<m_wizardList.size();i++)
{
m_wizardList[i]->close();
delete m_wizardList[i];
}
m_wizardList.clear();

emsComms->stop();
emsComms->wait(1000);
delete emsComms;
Expand Down

0 comments on commit 29e70a7

Please sign in to comment.