diff --git a/src/slic3r/GUI/DesignSketchTool.cpp b/src/slic3r/GUI/DesignSketchTool.cpp index 9ca55025d8..65d1e91212 100644 --- a/src/slic3r/GUI/DesignSketchTool.cpp +++ b/src/slic3r/GUI/DesignSketchTool.cpp @@ -236,6 +236,7 @@ void DesignSketchTool::set_tool(Mode mode) void DesignSketchTool::cancel() { + close_session_chrome(); // same orphaned-field freeze as finish() — see snaporca-yce m_active = false; m_points.clear(); m_entities.clear(); @@ -2009,6 +2010,11 @@ void DesignSketchTool::keep_segment_as_drawn() void DesignSketchTool::finish() { + // A value field still open at commit time outlives the session — the editor is a top-level + // frame — and inline_busy stays set, so every later click is swallowed at on_mouse_impl's + // first branch and the viewport reads as dead. Dismiss it first (keep-as-drawn, the same + // contract as the polyline terminators) and drop any queued field with it. + close_session_chrome(); if (op_ready()) confirm_op(); // apply a pending edit-op gizmo before committing if (tf_ready()) confirm_transform(); // apply a pending transform gizmo before committing auto cb = on_commit_entities; diff --git a/src/slic3r/GUI/DesignSketchTool.hpp b/src/slic3r/GUI/DesignSketchTool.hpp index d72c149974..cd8dc8ef59 100644 --- a/src/slic3r/GUI/DesignSketchTool.hpp +++ b/src/slic3r/GUI/DesignSketchTool.hpp @@ -357,6 +357,16 @@ public: m_autoedit_seen = int(m_entities.size()); m_live_quotes.clear(); // rebuilt from current geometry on the next render } + // Take down the session's floating chrome: the open value field (dismiss = keep-as-drawn), + // the queue of fields behind it, and the corner readout. All three are top-level windows fed + // only while the tool is live, so nothing else would ever clear them — reset_autoedit() alone + // clears the flag and leaves the frame on screen. Called by finish()/cancel(); safe when + // nothing is open. + void close_session_chrome() { + if (on_inline_dismiss) on_inline_dismiss(); // no-op when no field is open + reset_autoedit(); + if (on_readout) on_readout(std::string()); // the HUD is not redrawn once the tool stops + } // Ctrl+Z while sketching: drop the last drawn entity (reuses delete_selected's remap). bool undo_last_entity() { if (!m_active || m_entities.empty()) return false;