+ if(params->isCurrentProject) {
+ if (params->unsaveModif) {
+ QMessageBox msgBox;
+ msgBox.setText("The project has been modified.");
+ msgBox.setInformativeText("Do you want to save your changes?");
+ msgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
+ msgBox.setDefaultButton(QMessageBox::Save);
+
+ int ret = msgBox.exec();
+
+ switch(ret) {
+ case QMessageBox::Save :
+ slotSaveProject();
+ doClose = true;
+ break;
+ case QMessageBox::Discard :
+ doClose = true;
+ break;
+ }
+ }
+ else {
+ doClose = true;
+ }
+ if (doClose) {
+ // removing the GroupWidget from stack
+ QWidget *widget = stackedWidget->widget(1);
+ stackedWidget->removeWidget(widget);
+ stackedWidget->setCurrentIndex(0);