mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Refresh content if game is configured in settings
After a failed initialisation.
This commit is contained in:
@@ -98,6 +98,10 @@ void LootState::load(YAML::Node& settings) {
|
||||
++it;
|
||||
}
|
||||
|
||||
if (currentGame_ == end(games_)) {
|
||||
selectGame("");
|
||||
}
|
||||
|
||||
// Re-initialise the current game in case the game path setting was changed.
|
||||
currentGame_->Init(true);
|
||||
// Update game path in settings object.
|
||||
|
||||
@@ -323,6 +323,12 @@ function onCloseSettingsDialog(evt) {
|
||||
loot.DOM.updateEnabledGames(loot.installedGames);
|
||||
loot.DOM.updateSelectedGame(loot.game.folder);
|
||||
})
|
||||
.then(() => {
|
||||
if (loot.game.folder.length === 0) {
|
||||
/* Initialisation failed and game was configured in settings. */
|
||||
onContentRefresh();
|
||||
}
|
||||
})
|
||||
.catch(loot.handlePromiseError);
|
||||
}
|
||||
function onEditorOpen(evt) {
|
||||
|
||||
Reference in New Issue
Block a user