1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-04-11 08:06:42 +00:00

Cleanup comments.

This commit is contained in:
cc9cii 2014-09-07 18:37:33 +10:00
parent dba352fd6f
commit cedf1171e3

View file

@ -174,15 +174,15 @@ bool CSVDoc::ViewManager::closeRequest (View *view)
bool continueWithClose = true; bool continueWithClose = true;
if (iter!=mViews.end()) // found view in mViews if (iter!=mViews.end())
{ {
bool last = countViews (view->getDocument())<=1; bool last = countViews (view->getDocument())<=1;
if (last) // only this view for the document if (last)
continueWithClose = notifySaveOnClose (view); continueWithClose = notifySaveOnClose (view);
else else
{ {
(*iter)->deleteLater(); // there are other views, delete this one (*iter)->deleteLater();
mViews.erase (iter); mViews.erase (iter);
updateIndices(); updateIndices();
@ -345,10 +345,10 @@ void CSVDoc::ViewManager::exitApplication (CSVDoc::View *view)
{ {
// close the current view first // close the current view first
if(!closeRequest(view)) if(!closeRequest(view))
return; // don't exit the application return;
else else
{ {
view->deleteLater(); // ok to close the current view view->deleteLater();
view->setVisible(false); view->setVisible(false);
std::vector<View *>::iterator iter = std::find (mViews.begin(), mViews.end(), view); std::vector<View *>::iterator iter = std::find (mViews.begin(), mViews.end(), view);
if (iter!=mViews.end()) if (iter!=mViews.end())
@ -363,7 +363,6 @@ void CSVDoc::ViewManager::exitApplication (CSVDoc::View *view)
// raise the window // raise the window
mViews.back()->activateWindow(); mViews.back()->activateWindow();
mViews.back()->raise(); mViews.back()->raise();
// attempt to close it
if (!closeRequest(mViews.back())) if (!closeRequest(mViews.back()))
return; return;
else else