From e1a1fdb0dacd992c69c8998896b0d6c5453491ce Mon Sep 17 00:00:00 2001 From: RossAscends <124905043+RossAscends@users.noreply.github.com> Date: Thu, 5 Jun 2025 16:13:27 +0900 Subject: [PATCH] dont reload editor list on world list tag click if that world is already displayed and open in the editor --- public/scripts/world-info.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js index 5b19837eb..0f6e4443c 100644 --- a/public/scripts/world-info.js +++ b/public/scripts/world-info.js @@ -5631,9 +5631,12 @@ export function initWorldInfo() { select2ChoiceClickSubscribe($('#world_info'), target => { const name = $(target).text(); const selectedIndex = world_names.indexOf(name); - if (selectedIndex !== -1) { + const alreadySelectedInEditor = $('#world_editor_select option:selected').text() === name; + if (selectedIndex !== -1 && !alreadySelectedInEditor) { $('#world_editor_select').val(selectedIndex).trigger('change'); console.log('Quick selection of world', name); + } else { + console.warn('lets not reload an already loaded list yes?'); } }, { buttonStyle: true, closeDrawer: true }); }