aboutsummaryrefslogtreecommitdiff
path: root/src/base_tab/BaseImportTab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/base_tab/BaseImportTab.cpp')
-rw-r--r--src/base_tab/BaseImportTab.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/base_tab/BaseImportTab.cpp b/src/base_tab/BaseImportTab.cpp
index cd0d980..4fa9045 100644
--- a/src/base_tab/BaseImportTab.cpp
+++ b/src/base_tab/BaseImportTab.cpp
@@ -1,13 +1,22 @@
#include "BaseImportTab.hpp"
-BaseImportTab::BaseImportTab(wxFrame *parent):
-TabBase_TabImport(parent)
+BaseImportTab::BaseImportTab(wxFrame *parent, TabInfos *main_tab):
+TabBase_TabImport(parent), main_tab(main_tab)
{
+RefreshImportLists();
+}
+
+void BaseImportTab::RefreshImportLists(){
for (TabInfos *i : wxGetApp().ListTabInfos()) {
- if (i->type == TabInfos::GAME || i->type == TabInfos::BASE) {
+ if (i->type == TabInfos::GAME) {
wxWindow *win = dynamic_cast<wxWindow *>(i);
opened_game_list->Append(win->GetLabel(),i);
opened_game_list->SetSelection(0);
}
+ else if (i->type == TabInfos::BASE && i->id != main_tab->id) {
+ wxWindow *win = dynamic_cast<wxWindow *>(i);
+ opened_db_list->Append(win->GetLabel(),i);
+ opened_db_list->SetSelection(0);
+ }
}
}