From 0e5c3cb6744c00e9b47939d3e4ea3b7e2587efbb Mon Sep 17 00:00:00 2001 From: Johannes Baumeister Date: Wed, 15 Apr 2026 22:05:50 +0200 Subject: [PATCH] Fixed 'Add Section' button to properly activate drawing mode --- index.html | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 7c56755..547886f 100644 --- a/index.html +++ b/index.html @@ -2191,8 +2191,21 @@ // --- Variant Management UI --- window.startNewPath = (id) => { const layer = routeLayers[id]; - if (layer && layer.editor) { - layer.editor.newPath(); + if (layer) { + // Activate drawing state + state.isDrawing = true; + state.isMeasuring = false; + updateToolCursors(); + + // Ensure edit mode is on + if (!layer.editor) layer.enableEdit(); + + // Trigger new path drawing + if (layer.editor) { + layer.editor.newPath(); + } else { + console.error("Editor not found on layer", id); + } } };