diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-12-26 18:56:59 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-12-26 18:56:59 +0100 |
| commit | 5c8334af1d96eb22ad09318b531fd7441f277285 (patch) | |
| tree | f664a90934888a5c443962760cc520cd39725ec6 /src/base_tab/BaseTab.cpp | |
| parent | af331272c7a5a5c27b55ee17b54a0e710c8f5a93 (diff) | |
Debug db import
Diffstat (limited to 'src/base_tab/BaseTab.cpp')
| -rw-r--r-- | src/base_tab/BaseTab.cpp | 9 |
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()); |
