]> git.saurik.com Git - wxWidgets.git/commitdiff
Avoid using wxTextCtrl::SaveFile with no arg
authorJulian Smart <julian@anthemion.co.uk>
Tue, 3 Sep 2002 20:36:58 +0000 (20:36 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 3 Sep 2002 20:36:58 +0000 (20:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/mobile/wxedit/wxedit.cpp

index fe983016ef8108a750ad172ecc6b80d7aafd3f03..c3e155bacebd0a4f8a69ecf6aeadffcd459894a6 100644 (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;
 }