Follow-up on fbf2978190: Refresh Cut gizmo immediately,

when state of "inches" checkbox is changed.
+ Fixed update of Z value, when Cut gizmo is in mm
This commit is contained in:
YuSanka 2020-12-14 09:06:19 +01:00
parent 2b3d9359d4
commit 0f11ff8525
2 changed files with 4 additions and 2 deletions

View File

@ -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();

View File

@ -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<PlaterPresetComboBox*>& Sidebar::combos_filament()