From a7150197888ba2e0a529e5da594ed9061ef91e4a Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 3 Sep 2002 20:36:58 +0000 Subject: [PATCH] Avoid using wxTextCtrl::SaveFile with no arg git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/mobile/wxedit/wxedit.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/samples/mobile/wxedit/wxedit.cpp b/samples/mobile/wxedit/wxedit.cpp index fe983016ef..c3e155bace 100644 --- a/samples/mobile/wxedit/wxedit.cpp +++ b/samples/mobile/wxedit/wxedit.cpp @@ -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; } -- 2.45.2