void Model_Application::deleteDocument(string theDocID)
{
- myDocs.erase(theDocID);
+ if (myDocs.find(theDocID) != myDocs.end()) {
+ myDocs[theDocID]->close(true);
+ myDocs.erase(theDocID);
+ }
+ myLoadedByDemand.clear();
+}
+
+void Model_Application::deleteAllDocuments()
+{
+ myDocs.clear();
+ myLoadedByDemand.clear();
}
//=======================================================================