From e0be371bbca5b81b054c3dd0b8cc799652542675 Mon Sep 17 00:00:00 2001 From: Evan Scamehorn Date: Thu, 4 Dec 2025 14:38:44 -0600 Subject: [PATCH] fix editing routes in UI --- src/UIManager.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/UIManager.js b/src/UIManager.js index 29adc61..cc183c4 100644 --- a/src/UIManager.js +++ b/src/UIManager.js @@ -225,9 +225,11 @@ export class UIManager { btnEdit.title = "Redraw Route"; btnEdit.style.padding = "4px 8px"; btnEdit.onclick = () => { - // Edit flow: Enter draft mode with existing data + // --- FIX IS HERE --- + // 1. Enter draft mode first (this resets the drafting state) + this.enterDraftMode(); + // 2. Load the route data (this populates the drafting state) this.routeManager.editSavedRoute(index); - this.enterDraftMode(); // UI Change }; const btnDel = document.createElement('button');