From 12a5f44af4d70404e738bb31f0082344a04e74b2 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Mon, 11 Jan 2016 17:55:28 +0000 Subject: [PATCH] Fix CRCs not displayed after sorting This is a regression introduced in 47c8c0715d6415d2dc49b09b32015f82fc641bb5. --- src/gui/html/js/events.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gui/html/js/events.js b/src/gui/html/js/events.js index 8e835446..b268af6c 100644 --- a/src/gui/html/js/events.js +++ b/src/gui/html/js/events.js @@ -134,6 +134,15 @@ function onSortPlugins() { return plugin.name === loot.game.plugins[index].name; }); if (loadOrderIsUnchanged) { + result.forEach((plugin) => { + const existingPlugin = loot.game.plugins.find((item) => { + return item.name === plugin.name; + }); + if (existingPlugin) { + existingPlugin.crc = plugin.crc; + existingPlugin.isEmpty = plugin.isEmpty; + } + }); /* Send cancelSort query to notify that no unapplied sorting changes are present. Not doing so prevents LOOT's window from closing. */ loot.query('cancelSort');