Control map selection loading using shouldLoadSelection flag

This commit is contained in:
2026-05-07 10:49:52 +02:00
parent 4fd6ee8534
commit fd98d255b0

View File

@@ -476,12 +476,12 @@ async function refreshThumbnails(selectedPath, shouldLoadSelection = true) {
thumbList.appendChild(el);
if (fileUrl) {
if (idx === 0 && !selectedPath) {
if (shouldLoadSelection && idx === 0 && !selectedPath) {
currentMapPath = item.path;
setSkyFromUrl(fileUrl);
setStatus(`Showing ${item.filename}`);
}
if (selectedPath && selectedPath === item.path) {
if (shouldLoadSelection && selectedPath && selectedPath === item.path) {
currentMapPath = item.path;
setSkyFromUrl(fileUrl);
setStatus(`Showing ${item.filename}`);