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 *)));
|
this, SLOT (progress (int, int, int, int, CSMDoc::Document *)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// QMainWindow *mainWindow = new QMainWindow;
|
View *view = new View (*this, document, countViews (document)+1);
|
||||||
|
|
||||||
View *view = new View (*this, document, countViews (document)+1); //, mainWindow);
|
|
||||||
|
|
||||||
mViews.push_back (view);
|
mViews.push_back (view);
|
||||||
|
|
||||||
|
@ -104,18 +102,21 @@ bool CSVDoc::ViewManager::closeRequest (View *view)
|
||||||
|
|
||||||
CSMDoc::Document *document = view->getDocument();
|
CSMDoc::Document *document = view->getDocument();
|
||||||
|
|
||||||
//notify user of saving in progress
|
if (last)
|
||||||
if ( document->getState() & CSMDoc::State_Saving )
|
{
|
||||||
continueWithClose = showSaveInProgressMessageBox (view);
|
//notify user of saving in progress
|
||||||
else
|
if ( (document->getState() & CSMDoc::State_Saving) )
|
||||||
//notify user of unsaved changes and process response
|
continueWithClose = showSaveInProgressMessageBox (view);
|
||||||
if ( document->getState() & CSMDoc::State_Modified)
|
else
|
||||||
continueWithClose = showModifiedDocumentMessageBox (view);
|
//notify user of unsaved changes and process response
|
||||||
|
if ( document->getState() & CSMDoc::State_Modified)
|
||||||
|
continueWithClose = showModifiedDocumentMessageBox (view);
|
||||||
|
}
|
||||||
|
|
||||||
|
mViews.erase (iter);
|
||||||
|
|
||||||
if (continueWithClose)
|
if (continueWithClose)
|
||||||
{
|
{
|
||||||
mViews.erase (iter);
|
|
||||||
|
|
||||||
if (last)
|
if (last)
|
||||||
mDocumentManager.removeDocument (document);
|
mDocumentManager.removeDocument (document);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue