From 89575f2c6ddaa1b201166c046b0b1c03c16e4eb0 Mon Sep 17 00:00:00 2001 From: mpv Date: Fri, 17 Apr 2015 09:51:27 +0300 Subject: [PATCH] Fix for the issue #476: really close all documents on close --- src/Model/Model_Application.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Model/Model_Application.cpp b/src/Model/Model_Application.cpp index a825e7471..212fd4c9c 100644 --- a/src/Model/Model_Application.cpp +++ b/src/Model/Model_Application.cpp @@ -61,6 +61,10 @@ void Model_Application::deleteDocument(string theDocID) void Model_Application::deleteAllDocuments() { + std::map >::iterator aDoc = myDocs.begin(); + for(; aDoc != myDocs.end(); aDoc++) { + aDoc->second->close(); + } myDocs.clear(); myLoadedByDemand.clear(); } -- 2.39.2