]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/docview.cpp
Streamline wxSocket code: wxSocketBase now uses wxSocketImpl (previously known
[wxWidgets.git] / src / common / docview.cpp
index db67b4612334fe1f7d491e095125b2a5a2d43579..dbc0e56630a52eafa239d146b0078c43cd9319e7 100644 (file)
@@ -259,7 +259,7 @@ bool wxDocument::OnNewDocument()
 
 bool wxDocument::Save()
 {
 
 bool wxDocument::Save()
 {
-    if (!IsModified() && m_savedYet)
+    if ( AlreadySaved() )
         return true;
 
     if ( m_documentFile.empty() || !m_savedYet )
         return true;
 
     if ( m_documentFile.empty() || !m_savedYet )
@@ -1094,8 +1094,8 @@ void wxDocManager::OnUpdateFileNew(wxUpdateUIEvent& event)
 
 void wxDocManager::OnUpdateFileSave(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)
 }
 
 void wxDocManager::OnUpdateUndo(wxUpdateUIEvent& event)