From 09a7095f748596cc5aa936c966dc080150f3e4e5 Mon Sep 17 00:00:00 2001 From: Tim Warren Date: Mon, 20 Apr 2015 17:04:52 -0400 Subject: [PATCH] Remove redundant event handling code --- src/widgets/MainFrame.cpp | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/src/widgets/MainFrame.cpp b/src/widgets/MainFrame.cpp index 27e0a73..32b7c2f 100644 --- a/src/widgets/MainFrame.cpp +++ b/src/widgets/MainFrame.cpp @@ -222,39 +222,8 @@ void MainFrame::OnClosed(wxAuiNotebookEvent &WXUNUSED(event)) void MainFrame::OnCloseTab(wxCommandEvent &WXUNUSED(event)) { int current_tab = notebook->GetSelection(); - EditPane *editor = notebook->GetCurrentEditor(); - if (editor->IsModified()) - { - int Msgbox_Choice = wxMessageBox( - _T("File has not been saved, save file before closing?"), - _T("Modified File"), - wxYES_NO | wxCANCEL | wxICON_QUESTION, - this - ); - - if (Msgbox_Choice == wxYES) - { - editor->SaveFile(); - if (editor->IsModified()) - { - wxMessageBox(_("File could not be saved"), _("Error"), wxOK | wxICON_EXCLAMATION); - return; - } - //notebook->DeletePage(current_tab); - } - else if (Msgbox_Choice == wxCANCEL) - { - return; - } - } notebook->DeletePage(current_tab); - - // Disable controls - if (notebook->GetPageCount() == 0) - { - this->DisableEditControls(); - } } void MainFrame::OnSave(wxCommandEvent &WXUNUSED(event))