Design: Construction goes back on the sketch bar — a mode must show its state

Mirror of snaporca b3d4cf85af (parity 30 / 16).

Hiding it with the drawing tools was wrong: Construction is a persistent MODE, not a tool —
the Bed checkbox, not the Line button. Q and the offer's Construction row kept toggling a
checkbox nobody could see, so you could not tell whether the next line would be construction
geometry.

Scoping unchanged and already correct: m_tb_sketch is shown only in UiMode::Sketch, so it
appears exactly while a sketch is open or being edited.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LyRwbuq6fjn3VV9U9UvhBM
This commit is contained in:
Tommaso Bianchi
2026-08-01 18:36:18 +02:00
co-authored by Claude Opus 5
parent 86f1f96c50
commit 811719b7aa
+6 -1
View File
@@ -1298,7 +1298,12 @@ DesignPanel::DesignPanel(wxWindow* parent)
m_construction->Bind(wxEVT_CHECKBOX, [this](wxCommandEvent&) {
if (m_viewport && m_viewport->is_sketching())
m_viewport->set_sketch_construction(m_construction->GetValue()); });
sadd(m_construction);
// STAYS on the bar. Construction is not a tool, it is a persistent MODE — the same kind
// of thing as the Bed checkbox — and the sketch bar is already shown only in Sketch mode,
// so it appears exactly while it can apply. Hiding it left Q and the offer's Construction
// row still toggling a checkbox nobody could see: you could not tell whether the next
// line would be construction geometry. A stateful toggle has to show its state.
sadd_bar(m_construction);
add_sep(m_tb_sketch);
auto* b_del = icon_btn("design_delete", _L("Delete selected"));
b_del->Bind(wxEVT_BUTTON, [this](wxCommandEvent&) {