wxDocument::SaveAs sets m_savedYet flag correctly (patch 494838)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -227,16 +227,13 @@ bool wxDocument::OnNewDocument()
|
|||||||
|
|
||||||
bool wxDocument::Save()
|
bool wxDocument::Save()
|
||||||
{
|
{
|
||||||
bool ret = FALSE;
|
if (!IsModified() && m_savedYet)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
if (!IsModified() && m_savedYet) return TRUE;
|
if ( m_documentFile.empty() || !m_savedYet )
|
||||||
if (m_documentFile == wxT("") || !m_savedYet)
|
return SaveAs();
|
||||||
ret = SaveAs();
|
|
||||||
else
|
return OnSaveDocument(m_documentFile);
|
||||||
ret = OnSaveDocument(m_documentFile);
|
|
||||||
if ( ret )
|
|
||||||
SetDocumentSaved(TRUE);
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxDocument::SaveAs()
|
bool wxDocument::SaveAs()
|
||||||
@@ -316,6 +313,7 @@ bool wxDocument::OnSaveDocument(const wxString& file)
|
|||||||
}
|
}
|
||||||
Modify(FALSE);
|
Modify(FALSE);
|
||||||
SetFilename(file);
|
SetFilename(file);
|
||||||
|
SetDocumentSaved(TRUE);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user