diff --git a/resources/l10n/template.pot b/resources/l10n/template.pot index bcd2ec1d..3173c7ae 100644 --- a/resources/l10n/template.pot +++ b/resources/l10n/template.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: LOOT 0.10.3\n" "Report-Msgid-Bugs-To: https://github.com/loot/loot/issues\n" -"POT-Creation-Date: 2017-02-05 13:37+0000\n" +"POT-Creation-Date: 2017-02-06 18:49+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -726,7 +726,7 @@ msgstr "" msgid "You have not sorted your load order this session." msgstr "" -#: src/gui/state/game.cpp:369 +#: src/gui/state/game.cpp:374 msgid "" "An error occurred while parsing the metadata list(s): %1%.\n" "\n" @@ -744,15 +744,15 @@ msgid "" "[LOOT's website](https://loot.github.io/)." msgstr "" -#: src/gui/state/loot_state.cpp:131 +#: src/gui/state/loot_state.cpp:133 msgid "Error: Could not create LOOT settings file. %1%" msgstr "" -#: src/gui/state/loot_state.cpp:138 +#: src/gui/state/loot_state.cpp:140 msgid "Error: Settings parsing failed. %1%" msgstr "" -#: src/gui/state/loot_state.cpp:205 +#: src/gui/state/loot_state.cpp:207 msgid "Error: Game-specific settings could not be initialised. %1%" msgstr "" diff --git a/src/api/api_database.cpp b/src/api/api_database.cpp index a9aeb64a..d94bc022 100644 --- a/src/api/api_database.cpp +++ b/src/api/api_database.cpp @@ -104,7 +104,13 @@ bool ApiDatabase::UpdateMasterlist(const std::string& masterlistPath, throw std::invalid_argument("Given masterlist path \"" + masterlistPath + "\" does not have a valid parent directory."); Masterlist masterlist; - return masterlist.Update(masterlistPath, remoteURL, remoteBranch); + if (masterlist.Update(masterlistPath, remoteURL, remoteBranch)) { + game_.GetMasterlist() = masterlist; + unevaluatedMasterlist_ = masterlist; + return true; + } + + return false; } MasterlistInfo ApiDatabase::GetMasterlistRevision(const std::string& masterlistPath, diff --git a/src/gui/state/game.cpp b/src/gui/state/game.cpp index 8598c55a..2fac0a50 100644 --- a/src/gui/state/game.cpp +++ b/src/gui/state/game.cpp @@ -339,8 +339,13 @@ void Game::ClearMessages() { messages_.clear(); } -bool Game::UpdateMasterlist() const { - return gameHandle_->GetDatabase()->UpdateMasterlist(MasterlistPath().string(), RepoURL(), RepoBranch()); +bool Game::UpdateMasterlist() { + if (gameHandle_->GetDatabase()->UpdateMasterlist(MasterlistPath().string(), RepoURL(), RepoBranch())) { + EvaluateLoadedMetadata(); + return true; + } + + return false; } MasterlistInfo Game::GetMasterlistInfo() const { diff --git a/src/gui/state/game.h b/src/gui/state/game.h index 1138d51c..e245b5e2 100644 --- a/src/gui/state/game.h +++ b/src/gui/state/game.h @@ -77,7 +77,7 @@ public: void AppendMessage(const Message& message); void ClearMessages(); - bool UpdateMasterlist() const; + bool UpdateMasterlist(); MasterlistInfo GetMasterlistInfo() const; void LoadMetadata();