Avoid using wxTextCtrl::SaveFile with no arg

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2002-09-03 20:36:58 +00:00
parent b2fee376fd
commit a715019788

View File

@ -249,10 +249,7 @@ void MyFrame::OnOpen( wxCommandEvent &event )
void MyFrame::OnSave( wxCommandEvent &event )
{
if (m_filename.empty())
OnSaveAs( event );
else
m_text->SaveFile( m_filename );
Save();
}
void MyFrame::OnSaveAs( wxCommandEvent &event )
@ -284,7 +281,12 @@ void MyFrame::OnQuit( wxCommandEvent &event )
bool MyFrame::Save()
{
m_text->SaveFile();
wxCommandEvent event;
if (m_filename.empty())
OnSaveAs( event );
else
m_text->SaveFile( m_filename );
return TRUE;
}