aboutsummaryrefslogtreecommitdiff
path: root/src/base_tab/AppendGameDialog.cpp
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-02-26 14:22:17 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2022-02-26 14:22:17 +0100
commit2068f8c6c3d3faa842bb9920591aa2ef30bc157c (patch)
treedbd57878311a0263e922635f52ad27264bff90b8 /src/base_tab/AppendGameDialog.cpp
parentb1a82ff56811565d11ef3b6506c5a7f3d8b595e9 (diff)
Improve game import
Diffstat (limited to 'src/base_tab/AppendGameDialog.cpp')
-rw-r--r--src/base_tab/AppendGameDialog.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/base_tab/AppendGameDialog.cpp b/src/base_tab/AppendGameDialog.cpp
index bfa33f3..1ff4310 100644
--- a/src/base_tab/AppendGameDialog.cpp
+++ b/src/base_tab/AppendGameDialog.cpp
@@ -5,10 +5,12 @@
AppendGameDialog::AppendGameDialog(wxWindow *parent, GameBase *base)
: AppendGameDialogBF(parent), base(base) {
- tinfos = MAINWIN->ListTabInfos();
- for (TabInfos *i : tinfos) {
- wxWindow *win = dynamic_cast<wxWindow *>(i);
- game_list->Append(win->GetLabel());
+ for (TabInfos *i : MAINWIN->ListTabInfos()) {
+ if (i->type == TabInfos::GAME || i->type == TabInfos::BASE) {
+ wxWindow *win = dynamic_cast<wxWindow *>(i);
+ game_list->Append(win->GetLabel());
+ tinfos.push_back(i);
+ }
}
Bind(wxEVT_BUTTON, &AppendGameDialog::OnCancel, this,