Control map selection loading using shouldLoadSelection flag
This commit is contained in:
@@ -476,12 +476,12 @@ async function refreshThumbnails(selectedPath, shouldLoadSelection = true) {
|
|||||||
thumbList.appendChild(el);
|
thumbList.appendChild(el);
|
||||||
|
|
||||||
if (fileUrl) {
|
if (fileUrl) {
|
||||||
if (idx === 0 && !selectedPath) {
|
if (shouldLoadSelection && idx === 0 && !selectedPath) {
|
||||||
currentMapPath = item.path;
|
currentMapPath = item.path;
|
||||||
setSkyFromUrl(fileUrl);
|
setSkyFromUrl(fileUrl);
|
||||||
setStatus(`Showing ${item.filename}`);
|
setStatus(`Showing ${item.filename}`);
|
||||||
}
|
}
|
||||||
if (selectedPath && selectedPath === item.path) {
|
if (shouldLoadSelection && selectedPath && selectedPath === item.path) {
|
||||||
currentMapPath = item.path;
|
currentMapPath = item.path;
|
||||||
setSkyFromUrl(fileUrl);
|
setSkyFromUrl(fileUrl);
|
||||||
setStatus(`Showing ${item.filename}`);
|
setStatus(`Showing ${item.filename}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user