aboutsummaryrefslogtreecommitdiff
path: root/src/base_tab/AppendGameDialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/base_tab/AppendGameDialog.cpp')
-rw-r--r--src/base_tab/AppendGameDialog.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/base_tab/AppendGameDialog.cpp b/src/base_tab/AppendGameDialog.cpp
index 8a76028..bfa33f3 100644
--- a/src/base_tab/AppendGameDialog.cpp
+++ b/src/base_tab/AppendGameDialog.cpp
@@ -24,5 +24,19 @@ void AppendGameDialog::OnImport(wxCommandEvent &event) {
std::vector<GameBase *> new_games_bases;
std::vector<Game *> new_games;
+ wxArrayInt selections;
+ game_list->GetSelections(selections);
+
+ for (int &i : selections) {
+ TabInfos *tinfo = tinfos[i];
+ if (tinfo->type == TabInfos::BASE) {
+ new_games_bases.push_back(static_cast<GameBase *>(tinfo->GetBase()));
+ } else if (tinfo->type == TabInfos::GAME) {
+ new_games.push_back(static_cast<Game *>(tinfo->GetGame()));
+ }
+ }
+
+ base->Save(to_ignore, new_games_bases, new_games);
+
this->Close();
} \ No newline at end of file