mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Don't ask to apply an unchanged load order
Instead, notify that no changes were made. Closes #523.
This commit is contained in:
@@ -129,6 +129,18 @@ function onSortPlugins() {
|
||||
if (!result) {
|
||||
return;
|
||||
}
|
||||
/* Check if sorted load order differs from current load order. */
|
||||
const loadOrderIsUnchanged = result.every((plugin, index) => {
|
||||
return plugin.name === loot.game.plugins[index].name;
|
||||
});
|
||||
if (loadOrderIsUnchanged) {
|
||||
/* Send cancelSort query to notify that no unapplied sorting changes are
|
||||
present. Not doing so prevents LOOT's window from closing. */
|
||||
loot.query('cancelSort');
|
||||
loot.Dialog.closeProgress();
|
||||
loot.Dialog.showNotification(loot.l10n.translate('Sorting made no changes to the load order.'));
|
||||
return;
|
||||
}
|
||||
loot.game.oldLoadOrder = loot.game.plugins;
|
||||
loot.game.loadOrder = [];
|
||||
result.forEach((plugin) => {
|
||||
|
||||
Reference in New Issue
Block a user