Remove redundant event handling code

This commit is contained in:
Tim Warren 2015-04-20 17:04:52 -04:00
parent 4d05a0943e
commit 09a7095f74
1 changed files with 0 additions and 31 deletions

View File

@ -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))