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);
+ }
}
};