X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/838dd956a4049c7c95f015ee6b79d3bcf2ec9d6e..e215c9959cfae9db319cbca376553301dfa17cf1:/src/common/docview.cpp diff --git a/src/common/docview.cpp b/src/common/docview.cpp index db67b46123..dbc0e56630 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -259,7 +259,7 @@ bool wxDocument::OnNewDocument() bool wxDocument::Save() { - if (!IsModified() && m_savedYet) + if ( AlreadySaved() ) return true; if ( m_documentFile.empty() || !m_savedYet ) @@ -1094,8 +1094,8 @@ void wxDocManager::OnUpdateFileNew(wxUpdateUIEvent& event) void wxDocManager::OnUpdateFileSave(wxUpdateUIEvent& event) { - wxDocument *doc = GetCurrentDocument(); - event.Enable( doc && doc->IsModified() ); + wxDocument * const doc = GetCurrentDocument(); + event.Enable( doc && !doc->AlreadySaved() ); } void wxDocManager::OnUpdateUndo(wxUpdateUIEvent& event)