forked from mirror/openmw-tes3mp
Fixed triggering confirmation messages boxes when more than one view is
open.
This commit is contained in:
parent
bf6c855e6d
commit
eb90bd71ba
1 changed files with 13 additions and 12 deletions
|
@ -62,9 +62,7 @@ CSVDoc::View *CSVDoc::ViewManager::addView (CSMDoc::Document *document)
|
|||
this, SLOT (progress (int, int, int, int, CSMDoc::Document *)));
|
||||
}
|
||||
|
||||
// QMainWindow *mainWindow = new QMainWindow;
|
||||
|
||||
View *view = new View (*this, document, countViews (document)+1); //, mainWindow);
|
||||
View *view = new View (*this, document, countViews (document)+1);
|
||||
|
||||
mViews.push_back (view);
|
||||
|
||||
|
@ -104,18 +102,21 @@ bool CSVDoc::ViewManager::closeRequest (View *view)
|
|||
|
||||
CSMDoc::Document *document = view->getDocument();
|
||||
|
||||
//notify user of saving in progress
|
||||
if ( document->getState() & CSMDoc::State_Saving )
|
||||
continueWithClose = showSaveInProgressMessageBox (view);
|
||||
else
|
||||
//notify user of unsaved changes and process response
|
||||
if ( document->getState() & CSMDoc::State_Modified)
|
||||
continueWithClose = showModifiedDocumentMessageBox (view);
|
||||
if (last)
|
||||
{
|
||||
//notify user of saving in progress
|
||||
if ( (document->getState() & CSMDoc::State_Saving) )
|
||||
continueWithClose = showSaveInProgressMessageBox (view);
|
||||
else
|
||||
//notify user of unsaved changes and process response
|
||||
if ( document->getState() & CSMDoc::State_Modified)
|
||||
continueWithClose = showModifiedDocumentMessageBox (view);
|
||||
}
|
||||
|
||||
mViews.erase (iter);
|
||||
|
||||
if (continueWithClose)
|
||||
{
|
||||
mViews.erase (iter);
|
||||
|
||||
if (last)
|
||||
mDocumentManager.removeDocument (document);
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue