From edcde496cf6eeeed17d5e40006d4e01000be4ad7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Feb 2026 14:59:05 +0000 Subject: [PATCH] Fix duplicate heightmap overlay cleanup on editor enter and exit Co-authored-by: Azgaar <26469650+Azgaar@users.noreply.github.com> --- public/modules/ui/heightmap-editor.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/modules/ui/heightmap-editor.js b/public/modules/ui/heightmap-editor.js index e204055a..56370832 100644 --- a/public/modules/ui/heightmap-editor.js +++ b/public/modules/ui/heightmap-editor.js @@ -3,6 +3,7 @@ function editHeightmap(options) { const {mode, tool} = options || {}; restartHistory(); + viewbox.selectAll("#heights").remove(); viewbox.insert("g", "#terrs").attr("id", "heights"); if (!mode) showModeDialog(); @@ -188,7 +189,7 @@ function editHeightmap(options) { // restore initial layers drawFeatures(); - byId("heights").remove(); + viewbox.selectAll("#heights").remove(); turnButtonOff("toggleHeight"); document .getElementById("mapLayers")