1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-10 06:39:49 +00:00

clean up properly after closing a top level window

This commit is contained in:
Marc Zinnschlag 2012-11-23 10:30:14 +01:00
parent 03aacd3263
commit 04158d03b0
2 changed files with 1 additions and 5 deletions

View File

@ -36,9 +36,6 @@ CSVDoc::ViewManager::~ViewManager()
{
for (std::vector<View *>::iterator iter (mViews.begin()); iter!=mViews.end(); ++iter)
delete *iter;
for (std::vector<View *>::iterator iter (mClosed.begin()); iter!=mClosed.end(); ++iter)
delete *iter;
}
CSVDoc::View *CSVDoc::ViewManager::addView (CSMDoc::Document *document)
@ -87,7 +84,7 @@ bool CSVDoc::ViewManager::closeRequest (View *view)
/// \todo check if document has not been saved -> return false and start close dialogue
mViews.erase (iter);
mClosed.push_back (view);
view->deleteLater();
if (last)
mDocumentManager.removeDocument (view->getDocument());

View File

@ -21,7 +21,6 @@ namespace CSVDoc
CSMDoc::DocumentManager& mDocumentManager;
std::vector<View *> mViews;
std::vector<View *> mClosed;
// not implemented
ViewManager (const ViewManager&);