From cedf1171e3936724ad4ffdcb811fc83b70ce0231 Mon Sep 17 00:00:00 2001 From: cc9cii Date: Sun, 7 Sep 2014 18:37:33 +1000 Subject: [PATCH] Cleanup comments. --- apps/opencs/view/doc/viewmanager.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/apps/opencs/view/doc/viewmanager.cpp b/apps/opencs/view/doc/viewmanager.cpp index e7d948ee77..5b6dbaaf67 100644 --- a/apps/opencs/view/doc/viewmanager.cpp +++ b/apps/opencs/view/doc/viewmanager.cpp @@ -174,15 +174,15 @@ bool CSVDoc::ViewManager::closeRequest (View *view) bool continueWithClose = true; - if (iter!=mViews.end()) // found view in mViews + if (iter!=mViews.end()) { bool last = countViews (view->getDocument())<=1; - if (last) // only this view for the document + if (last) continueWithClose = notifySaveOnClose (view); else { - (*iter)->deleteLater(); // there are other views, delete this one + (*iter)->deleteLater(); mViews.erase (iter); updateIndices(); @@ -345,10 +345,10 @@ void CSVDoc::ViewManager::exitApplication (CSVDoc::View *view) { // close the current view first if(!closeRequest(view)) - return; // don't exit the application + return; else { - view->deleteLater(); // ok to close the current view + view->deleteLater(); view->setVisible(false); std::vector::iterator iter = std::find (mViews.begin(), mViews.end(), view); if (iter!=mViews.end()) @@ -363,7 +363,6 @@ void CSVDoc::ViewManager::exitApplication (CSVDoc::View *view) // raise the window mViews.back()->activateWindow(); mViews.back()->raise(); - // attempt to close it if (!closeRequest(mViews.back())) return; else