From 618587aa48013a6331e6223d972d75cf1aa7a497 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Sun, 30 Jun 2019 01:08:25 -0400 Subject: [PATCH] Don't allow layer changes while drawing (closes #6584) --- modules/ui/map_data.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/ui/map_data.js b/modules/ui/map_data.js index d0b8475ac..1d8aad3d1 100644 --- a/modules/ui/map_data.js +++ b/modules/ui/map_data.js @@ -96,6 +96,10 @@ export function uiMapData(context) { function setLayer(which, enabled) { + // Don't allow layer changes while drawing - #6584 + var mode = context.mode(); + if (mode && /^draw/.test(mode.id)) return; + var layer = layers.layer(which); if (layer) { layer.enabled(enabled);