Skip to content

Commit dea711d

Browse files
committed
fix(print-layout): clear stale atlas masks
1 parent 71aa3d9 commit dea711d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/geolibre-desktop/src/components/layout/PrintLayoutDialog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -907,10 +907,10 @@ export function PrintLayoutDialog({
907907
// option, atlas, or dialog is turned off instead of waiting for another
908908
// camera drive that may never happen.
909909
useEffect(() => {
910-
if (open && atlasEnabled && atlasMaskEnabled) return;
910+
if (open && atlasActive && atlasMaskEnabled && atlasMaskAvailable) return;
911911
const map = mapControllerRef.current?.getMap();
912912
if (map) clearAtlasFeatureMask(map);
913-
}, [open, atlasEnabled, atlasMaskEnabled, mapControllerRef]);
913+
}, [open, atlasActive, atlasMaskEnabled, atlasMaskAvailable, mapControllerRef]);
914914
const atlasFilterValid = atlasFilterPredicate !== null;
915915
const atlasScaleValid = atlasExtentMode !== "scale" || Number(atlasScale) > 0;
916916
// A floor (not just > 0) keeps a mistyped tiny length from cutting a long

0 commit comments

Comments
 (0)