Update game list

This commit is contained in:
Loic Guegan 2022-12-25 15:51:00 +01:00
parent 92ec92a210
commit 060ed65712
3 changed files with 7 additions and 2 deletions

View file

@ -24,7 +24,7 @@ BaseGameTab::BaseGameTab(wxFrame *parent, std::string base_file, TabInfos *main_
void BaseGameTab::OnImport(wxCommandEvent &event) {
AppendGameDialog *dia = new AppendGameDialog(this, base);
dia->ShowModal();
game_list->DeleteAllItems();
glm->Clear();
deleted.clear();
edited.clear();
LoadFile();
@ -69,7 +69,7 @@ void BaseGameTab::OnSave(wxCommandEvent &event) {
closeLinkedTabEvent.SetClientData(main_tab);
ProcessEvent(closeLinkedTabEvent);
game_list->DeleteAllItems();
glm->Clear();
edited.clear();
deleted.clear();
LoadFile();

View file

@ -22,3 +22,7 @@ void GameListManager::AddGame(CType W,CType B,CType Evt,CType Rnd, CType Res, CT
game_list->SetItem(index, 6, Eco);
game_counter++;
}
void GameListManager::Clear(){
game_list->DeleteAllItems();
}

View file

@ -8,4 +8,5 @@ class GameListManager {
public:
GameListManager(wxListCtrl *game_list);
void AddGame(CType W,CType B,CType Evt,CType Rnd, CType Res, CType Eco);
void Clear();
};