From ab60fcae031c0a6ce548021d5d2c16a82f67df2d Mon Sep 17 00:00:00 2001 From: "zhou.xu" Date: Fri, 13 Dec 2024 17:02:30 +0800 Subject: [PATCH] FIX:fix bug of model object in instance coordinates in move gizmo jira:STUDIO-9180 Change-Id: I5c637dcfd1b284c833102097d510af747fbf7769 --- src/slic3r/GUI/Gizmos/GizmoObjectManipulation.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Gizmos/GizmoObjectManipulation.cpp b/src/slic3r/GUI/Gizmos/GizmoObjectManipulation.cpp index 5d2667de3..cce69f162 100644 --- a/src/slic3r/GUI/Gizmos/GizmoObjectManipulation.cpp +++ b/src/slic3r/GUI/Gizmos/GizmoObjectManipulation.cpp @@ -122,6 +122,9 @@ void GizmoObjectManipulation::update_settings_value(const Selection &selection) else {//if (is_local_coordinates()) {//for scale auto tran = selection.get_first_volume()->get_instance_transformation(); m_new_position = tran.get_matrix().inverse() * cs_center; + if (is_instance_coordinates()) { + m_new_position = Vec3d::Zero(); + } m_new_size = selection.get_bounding_box_in_current_reference_system().first.size(); m_unscale_size = selection.get_full_unscaled_instance_local_bounding_box().size(); m_new_scale = m_new_size.cwiseQuotient(m_unscale_size) * 100.0; @@ -887,7 +890,13 @@ void GizmoObjectManipulation::set_init_rotation(const Geometry::Transformation & index = 1; index_unit = 1; ImGui::AlignTextToFramePadding(); - imgui_wrapper->text(_L("Position")); + if (selection.is_single_full_instance() && is_instance_coordinates()) { + imgui_wrapper->text(_L("Translate(Relative)")); + } + else { + imgui_wrapper->text(_L("Position")); + } + ImGui::SameLine(caption_max + index * space_size); ImGui::PushItemWidth(unit_size); ImGui::BBLInputDouble(label_values[0][0], &display_position[0], 0.0f, 0.0f, "%.2f");