mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-28 03:11:47 +00:00
Design: a sketch takes its floating chrome with it when it ends
Confirming a sketch while an inline value field was open left the field behind. The editor is a top-level frame, so it survived the session that owned it, and inline_busy stayed set with it — on_mouse_impl then returned true at its first branch for every later click and the viewport was simply dead. No refusal, no message: exactly the "click the geometry, nothing happens" the pick bugs above it were mistaken for. finish() and cancel() now call close_session_chrome(): dismiss the open field (keep-as-drawn, the same contract the polyline terminators already use), drop the queue of fields behind it, and clear the corner readout — which had the same defect for the same reason, sitting on 336.8° over a committed sketch because nothing redraws the HUD once the tool stops. Verified on the rig on the exact reported sequence: line on XZ, Return to accept the length, Confirm with the Angle field still open. The field goes, the sketch commits, and the next click reaches the pick (pick trace shows down/up consumed) and selects Sketch1. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LyRwbuq6fjn3VV9U9UvhBM
This commit is contained in:
co-authored by
Claude Opus 5
parent
1addba6ea0
commit
6e9910303b
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user