File tree Expand file tree Collapse file tree 1 file changed +8
-17
lines changed
Expand file tree Collapse file tree 1 file changed +8
-17
lines changed Original file line number Diff line number Diff line change @@ -857,28 +857,14 @@ void event_editor::OnCancel()
857857{
858858}
859859
860- // this is called the clicking the ID_CANCEL button
860+ // this is called when you click the ID_CANCEL button
861861void event_editor::OnButtonCancel ()
862862{
863863 audiostream_close_file (m_wave_id, 0 );
864864 m_wave_id = -1 ;
865865
866- event_annotation_prune ();
867-
868- theApp.record_window_data (&Events_wnd_data, this );
869- delete Event_editor_dlg;
870- Event_editor_dlg = NULL ;
871- }
872-
873- void event_editor::OnClose ()
874- {
875- int z;
876-
877- audiostream_close_file (m_wave_id, 0 );
878- m_wave_id = -1 ;
879-
880866 if (query_modified ()) {
881- z = MessageBox (" Do you want to keep your changes?" , " Close" , MB_ICONQUESTION | MB_YESNOCANCEL);
867+ int z = MessageBox (" Do you want to keep your changes?" , " Close" , MB_ICONQUESTION | MB_YESNOCANCEL);
882868 if (z == IDCANCEL){
883869 return ;
884870 }
@@ -890,12 +876,17 @@ void event_editor::OnClose()
890876 }
891877
892878 event_annotation_prune ();
893-
879+
894880 theApp.record_window_data (&Events_wnd_data, this );
895881 delete Event_editor_dlg;
896882 Event_editor_dlg = NULL ;
897883}
898884
885+ void event_editor::OnClose ()
886+ {
887+ OnButtonCancel ();
888+ }
889+
899890void event_editor::insert_handler (int old, int node)
900891{
901892 int i;
You can’t perform that action at this time.
0 commit comments