mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-10 04:20:08 +00:00
Add Vertical/Horizontal axis-lock checkboxes to Support Painting (#14262)
* 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 <noreply@anthropic.com> * 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) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com> Co-authored-by: yw4z <ywsyildiz@gmail.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user