From 8c0ff69474757b19eca8157e29feb62d9a80452f Mon Sep 17 00:00:00 2001 From: "zhou.xu" Date: Mon, 23 Oct 2023 15:28:57 +0800 Subject: [PATCH] FIX:allow cutting into only an object "keep" modify to "Keep orientation" Jira:STUDIO-4227 Change-Id: I37759258f527ce1aa1f6b66dd4918eab135cb583 --- src/slic3r/GUI/Gizmos/GLGizmoAdvancedCut.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoAdvancedCut.cpp b/src/slic3r/GUI/Gizmos/GLGizmoAdvancedCut.cpp index 31c1a2cc2..7a7a26063 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoAdvancedCut.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoAdvancedCut.cpp @@ -1922,18 +1922,18 @@ void GLGizmoAdvancedCut::render_cut_plane_input_window(float x, float y, float b label_width = width; } - auto render_part_action_line = [this, label_width, &connectors](const wxString &label, const wxString &suffix, bool &keep_part, bool &place_on_cut_part, bool &rotate_part) { + auto render_part_action_line = [this, label_width,has_connectors](const wxString &label, const wxString &suffix, bool &keep_part, bool &place_on_cut_part, bool &rotate_part) { bool keep = true; + m_imgui->disabled_begin(has_connectors || m_cut_to_parts); ImGui::AlignTextToFramePadding(); - m_imgui->text(m_cut_to_parts ? _L("Part") : _L("Object") +label); + m_imgui->bbl_checkbox(m_cut_to_parts ? _L("Part") : _L("Object") + label, has_connectors ? keep : keep_part); float marker_size = 12; render_color_marker(marker_size, suffix == "##upper" ? UPPER_PART_COLOR : LOWER_PART_COLOR); - ImGui::SameLine(label_width); - - m_imgui->disabled_begin(!keep_part || m_cut_to_parts); + float new_label_width = label_width + (m_cut_to_parts ? 10.0f : 20.0f); + ImGui::SameLine(new_label_width); bool is_keep = !place_on_cut_part && !rotate_part; - if (m_imgui->bbl_checkbox(_L("Keep") + suffix, is_keep)){ + if (m_imgui->bbl_checkbox(_L("Keep orientation") + suffix, is_keep)){ rotate_part = false; place_on_cut_part = false; }