From 31548a230dfd3b6200e63b621d388d2643596941 Mon Sep 17 00:00:00 2001 From: Tommaso Bianchi Date: Fri, 14 Aug 2026 22:36:39 +0200 Subject: [PATCH] CAD: Mirror takes its body from the viewport (snaporca-gtd3, e1p item 6) Ported from snaporca 2516961a32. See that commit for the measurements. Co-Authored-By: Claude Opus 5 (1M context) --- src/slic3r/GUI/DesignPanel.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/slic3r/GUI/DesignPanel.cpp b/src/slic3r/GUI/DesignPanel.cpp index 140215b3bd..9f6571811b 100644 --- a/src/slic3r/GUI/DesignPanel.cpp +++ b/src/slic3r/GUI/DesignPanel.cpp @@ -3448,6 +3448,14 @@ DesignPanel::DesignPanel(wxWindow* parent) refresh_preview(); // re-tints the operands + rebuilds the ghost } } + // Mirror card open: the body you point at is the body that gets mirrored. Same one-way + // flow Boolean had (snaporca-310o) and the same fix — the combo stays as the typed half. + // Only one operand here, so there is no slot to alternate and no swap to do. + if (m_active == Tool::Mirror && m_sel_solid_body >= 0 && m_mirror_body != nullptr && + m_sel_solid_body < int(m_mirror_body->GetCount())) { + m_mirror_body->SetSelection(m_sel_solid_body); // selection index == body index + refresh_preview(); + } // If the Shell card is open, a face pick chooses the open face: update the label + gizmo // + ghost so the hollow updates live. if (m_active == Tool::Shell) {