diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-12-27 19:41:33 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-12-27 19:41:33 +0100 |
| commit | cb6fbd18f374773a6cd6ea1db42f6d6ff6147a1e (patch) | |
| tree | 4c3539f63769fc2f62e0e113ac54f0f641091c54 /src/base_tab/BaseTab.cpp | |
| parent | 32fdf9272e1a94f8c51274a1758f4feae555341a (diff) | |
Improve database tab
Diffstat (limited to 'src/base_tab/BaseTab.cpp')
| -rw-r--r-- | src/base_tab/BaseTab.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/base_tab/BaseTab.cpp b/src/base_tab/BaseTab.cpp index 5db4f53..8434840 100644 --- a/src/base_tab/BaseTab.cpp +++ b/src/base_tab/BaseTab.cpp @@ -1,6 +1,8 @@ #include "BaseTab.hpp" #include <wx/filename.h> +wxDEFINE_EVENT(REFRESH_MANAGE_TAB, wxCommandEvent); + BaseTab::BaseTab(wxFrame *parent, std::string base_file) : TabBase(parent), TabInfos(TabInfos::BASE), base_file(base_file){ @@ -14,7 +16,7 @@ BaseTab::BaseTab(wxFrame *parent, std::string base_file) import_tab=new BaseImportTab((wxFrame *)notebook,base,this); notebook->AddPage(import_tab, "Import games"); // Manage tab - manage_tab=new BaseManageTab((wxFrame *)notebook, base, games_tab->glm); + manage_tab=new BaseManageTab((wxFrame *)notebook, base, games_tab->glm,import_tab,games_tab); notebook->AddPage(manage_tab, "Manage database"); // Refresh dynamic elements of the database (tab title, available db for import etc.) @@ -23,6 +25,9 @@ BaseTab::BaseTab(wxFrame *parent, std::string base_file) // Bindings this->Bind(wxEVT_BUTTON, &BaseTab::OnSave, this, ID_SAVE_BUTTON); this->Bind(wxEVT_LIST_ITEM_ACTIVATED, &BaseTab::OnOpenGame, this, ID_TABGAMES_GAME_LIST); + Bind(REFRESH_MANAGE_TAB,[tab=manage_tab](wxCommandEvent &e){ + tab->RefreshInformations(); + },wxID_ANY); } void BaseTab::OnOpenGame(wxListEvent &event){ |
