aboutsummaryrefslogtreecommitdiff
path: root/src/base_tab/BaseTab.cpp
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-12-26 18:56:59 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2022-12-26 18:56:59 +0100
commit5c8334af1d96eb22ad09318b531fd7441f277285 (patch)
treef664a90934888a5c443962760cc520cd39725ec6 /src/base_tab/BaseTab.cpp
parentaf331272c7a5a5c27b55ee17b54a0e710c8f5a93 (diff)
Debug db import
Diffstat (limited to 'src/base_tab/BaseTab.cpp')
-rw-r--r--src/base_tab/BaseTab.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/base_tab/BaseTab.cpp b/src/base_tab/BaseTab.cpp
index 8a2b4ad..bc40e60 100644
--- a/src/base_tab/BaseTab.cpp
+++ b/src/base_tab/BaseTab.cpp
@@ -55,8 +55,13 @@ void BaseTab::OpenDatabase(std::string dbpath) {
}
void BaseTab::OnSave(wxCommandEvent &event) {
- std::vector<std::shared_ptr<GameBase>> dummy_empty_base;
- base->Save(games_tab->GetDeletedGameIds(), dummy_empty_base, games_tab->GetEditedGames());
+ // Build new games
+ std::vector<std::shared_ptr<Game>> new_games=games_tab->GetEditedGames();
+ for(auto g: import_tab->GetGameToImport()){
+ new_games.push_back(g);
+ }
+ SHOW_DIALOG_BUSY("Apply all changes. Take a coffee, this process can takes time...");
+ base->Save(games_tab->GetDeletedGameIds(), import_tab->GetDatabaseToImport(), new_games);
// Close all opened games in this database
wxCommandEvent closeLinkedTabEvent(CLOSE_LINKED_TAB, GetId());