From 0f11ff8525d87ebb25c49e5596259b57af8be5e4 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Mon, 14 Dec 2020 09:06:19 +0100 Subject: [PATCH] Follow-up on https://github.com/prusa3d/PrusaSlicer/commit/fbf297819094958af2da1839dbdc8d59e6f4f795: Refresh Cut gizmo immediately, when state of "inches" checkbox is changed. + Fixed update of Z value, when Cut gizmo is in mm --- src/slic3r/GUI/Gizmos/GLGizmoCut.cpp | 3 +-- src/slic3r/GUI/Plater.cpp | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoCut.cpp b/src/slic3r/GUI/Gizmos/GLGizmoCut.cpp index 7d878ffe0..ffc1e7dcb 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoCut.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoCut.cpp @@ -180,8 +180,7 @@ void GLGizmoCut::on_render_input_window(float x, float y, float bottom_limit) ImGui::SameLine(); m_imgui->text(imperial_units ? _L("in") : _L("mm")); - if (imperial_units) - m_cut_z = cut_z * ObjectManipulation::in_to_mm; + m_cut_z = cut_z * (imperial_units ? ObjectManipulation::in_to_mm : 1.0); ImGui::Separator(); diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index d46ea3567..71205f014 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -1336,6 +1336,9 @@ void Sidebar::update_ui_from_settings() p->object_manipulation->update_ui_from_settings(); show_info_sizer(); update_sliced_info_sizer(); + // update Cut gizmo, if it's open + p->plater->canvas3D()->update_gizmos_on_off_state(); + p->plater->canvas3D()->request_extra_frame(); } std::vector& Sidebar::combos_filament()