From: Vadim Zeitlin Date: Wed, 25 Jan 2012 00:05:15 +0000 (+0000) Subject: Update wxCommandProcessor after saving wxDocument. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/8c85eb7b47b30a169988406c1da2e473340f5b18 Update wxCommandProcessor after saving wxDocument. Surprisingly, wxCommandProcessor::MarkAsSaved() method was never called by wxDocument so saving the document didn't update wxCommandProcessor dirty status. Do add a call to MarkAsSaved() now, this allows wxCommandProcessor to track its status correctly (and actually more correctly than the dirty status of the document which becomes "dirty" after doing and undoing an operation after saving it, unlike wxCommandProcessor::IsDirty() which correctly returns false in this case). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70461 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/docview.cpp b/src/common/docview.cpp index e4f6bf3bdb..eba884d600 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -397,6 +397,9 @@ bool wxDocument::OnSaveDocument(const wxString& file) if ( !DoSaveDocument(file) ) return false; + if ( m_commandProcessor ) + m_commandProcessor->MarkAsSaved(); + Modify(false); SetFilename(file); SetDocumentSaved(true);