From 811719b7aacccc569cf1ae905dc45ffcf29798a4 Mon Sep 17 00:00:00 2001 From: Tommaso Bianchi Date: Sat, 1 Aug 2026 18:36:18 +0200 Subject: [PATCH] =?UTF-8?q?Design:=20Construction=20goes=20back=20on=20the?= =?UTF-8?q?=20sketch=20bar=20=E2=80=94=20a=20mode=20must=20show=20its=20st?= =?UTF-8?q?ate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) Claude-Session: https://claude.ai/code/session_01LyRwbuq6fjn3VV9U9UvhBM --- src/slic3r/GUI/DesignPanel.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/DesignPanel.cpp b/src/slic3r/GUI/DesignPanel.cpp index 450b5aff96..ddbaccc36a 100644 --- a/src/slic3r/GUI/DesignPanel.cpp +++ b/src/slic3r/GUI/DesignPanel.cpp @@ -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&) {