From 1d61962ea720b9b45caa3887057d2e6ec7821e64 Mon Sep 17 00:00:00 2001 From: mlugo-apx <37851545+mlugo-apx@users.noreply.github.com> Date: Tue, 7 Jul 2026 21:11:47 -0400 Subject: [PATCH] Add Vertical/Horizontal axis-lock checkboxes to Support Painting (#14262) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Support Painting: add Vertical/Horizontal axis-lock checkboxes Adds the Vertical and Horizontal axis-lock checkboxes to the Support Painting gizmo, matching the UI in the MMU Segmentation and Seam Painter gizmos. The underlying constraint logic has lived in GLGizmoPainterBase since #2424 and already applies to any ToolType::BRUSH action — the Support gizmo was the only painter without the UI to enable it. The Circle and Sphere brush arms are consolidated into a single "if (Circle || Sphere)" block matching the structure of GLGizmoMmuSegmentation::on_render_input_window, eliminating duplicate cursor-radius and axis-lock UI code. Co-Authored-By: Claude Opus 4.7 * Support Painting: keep Circle/Sphere as separate tool arms per review Reviewer requested keeping a separate condition per tool for future extensibility rather than merging Circle and Sphere into one branch. This restores the upstream Circle/Sphere arm structure and adds the Vertical/Horizontal axis-lock options to each arm, making the change purely additive over upstream. Co-Authored-By: Claude Opus 4.8 (1M context) --------- Co-authored-by: Claude Opus 4.7 Co-authored-by: yw4z --- src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp b/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp index dc2ec0d46e..f190e1ad97 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoFdmSupports.cpp @@ -315,6 +315,17 @@ void GLGizmoFdmSupports::on_render_input_window(float x, float y, float bottom_l ImGui::SameLine(drag_left_width + sliders_left_width); ImGui::PushItemWidth(1.5 * slider_icon_width); ImGui::BBLDragFloat("##cursor_radius_input", &m_cursor_radius, 0.05f, 0.0f, 0.0f, "%.2f"); + + if (m_imgui->bbl_checkbox(_L("Vertical"), m_vertical_only)) { + if (m_vertical_only) { + m_horizontal_only = false; + } + } + if (m_imgui->bbl_checkbox(_L("Horizontal"), m_horizontal_only)) { + if (m_horizontal_only) { + m_vertical_only = false; + } + } } else if (m_current_tool == ImGui::SphereButtonIcon) { m_cursor_type = TriangleSelector::CursorType::SPHERE; m_tool_type = ToolType::BRUSH; @@ -327,6 +338,17 @@ void GLGizmoFdmSupports::on_render_input_window(float x, float y, float bottom_l ImGui::SameLine(drag_left_width + sliders_left_width); ImGui::PushItemWidth(1.5 * slider_icon_width); ImGui::BBLDragFloat("##cursor_radius_input", &m_cursor_radius, 0.05f, 0.0f, 0.0f, "%.2f"); + + if (m_imgui->bbl_checkbox(_L("Vertical"), m_vertical_only)) { + if (m_vertical_only) { + m_horizontal_only = false; + } + } + if (m_imgui->bbl_checkbox(_L("Horizontal"), m_horizontal_only)) { + if (m_horizontal_only) { + m_vertical_only = false; + } + } } else if (m_current_tool == ImGui::FillButtonIcon) { m_cursor_type = TriangleSelector::CursorType::POINTER; m_tool_type = ToolType::SMART_FILL;