Cleaning code

This commit is contained in:
Loic Guegan 2022-12-27 18:33:21 +01:00
parent d87b42dcd6
commit 32fdf9272e
6 changed files with 14 additions and 17 deletions

View file

@ -48,7 +48,6 @@ MainWindow::MainWindow()
Bind(wxEVT_AUINOTEBOOK_PAGE_CHANGED, &MainWindow::OnPageChange, this,
wxID_ANY);
Bind(REFRESH_TAB_TITLE, &MainWindow::OnRefreshTabTitle, this, wxID_ANY);
Bind(NEW_GAME_EVENT, &MainWindow::OnNewGame, this, wxID_ANY);
Bind(wxEVT_CLOSE_WINDOW, &MainWindow::OnClose, this);
Bind(CLOSE_TAB_EVENT, &MainWindow::OnCloseTabEvent, this, wxID_ANY);
Bind(wxEVT_MENU, &MainWindow::OnMenuItemClick, this, wxID_ANY);
@ -234,12 +233,6 @@ void MainWindow::NewGame(bool useFen) {
}
}
void MainWindow::OnNewGame(wxCommandEvent &event) {
TabInfos *tab = (TabInfos*)event.GetClientData();
TabInfos *i=NewGame(tab->GetGame());
i->Link(tab);
}
void MainWindow::OnPageChange(wxAuiNotebookEvent &event) {
TabInfos *infos = dynamic_cast<TabInfos *>(notebook->GetCurrentPage());
if (infos->type != TabInfos::GAME) {