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
This commit is contained in:
Vadim Zeitlin 2012-01-25 00:05:15 +00:00
parent 812a21486d
commit 8c85eb7b47

View File

@ -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);