diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-02-26 14:22:17 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-02-26 14:22:17 +0100 |
| commit | 2068f8c6c3d3faa842bb9920591aa2ef30bc157c (patch) | |
| tree | dbd57878311a0263e922635f52ad27264bff90b8 | |
| parent | b1a82ff56811565d11ef3b6506c5a7f3d8b595e9 (diff) | |
Improve game import
| -rw-r--r-- | src/base_tab/AppendGameDialog.cpp | 10 |
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, |
