dont reload editor list on world list tag click if that world is already displayed and open in the editor

e1a1fdb0dacd992c69c8998896b0d6c5453491ce

RossAscends <124905043+RossAscends@users.noreply.github.com>

1 files changed, +4 -1Ignore whitespace
public/scripts/world-info.js+4 -1
@@ -5631,9 +5631,12 @@ export function initWorldInfo() {
5631 select2ChoiceClickSubscribe($('#world_info'), target => {5631 select2ChoiceClickSubscribe($('#world_info'), target => {
5632 const name = $(target).text();5632 const name = $(target).text();
5633 const selectedIndex = world_names.indexOf(name);5633 const selectedIndex = world_names.indexOf(name);
5634 if (selectedIndex !== -1) {5634 const alreadySelectedInEditor = $('#world_editor_select option:selected').text() === name;
5635 if (selectedIndex !== -1 && !alreadySelectedInEditor) {
5635 $('#world_editor_select').val(selectedIndex).trigger('change');5636 $('#world_editor_select').val(selectedIndex).trigger('change');
5636 console.log('Quick selection of world', name);5637 console.log('Quick selection of world', name);
5638 } else {
5639 console.warn('lets not reload an already loaded list yes?');
5637 }5640 }
5638 }, { buttonStyle: true, closeDrawer: true });5641 }, { buttonStyle: true, closeDrawer: true });
5639 }5642 }