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:
parent
03aacd3263
commit
04158d03b0
@ -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());
|
||||
|
@ -21,7 +21,6 @@ namespace CSVDoc
|
||||
|
||||
CSMDoc::DocumentManager& mDocumentManager;
|
||||
std::vector<View *> mViews;
|
||||
std::vector<View *> mClosed;
|
||||
|
||||
// not implemented
|
||||
ViewManager (const ViewManager&);
|
||||
|
Loading…
Reference in New Issue
Block a user