From eff8dd1ae53b06108f995b9560a4e44912ba8b9c Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Wed, 3 Apr 2019 09:05:52 +0200 Subject: [PATCH] Fixed negative values for size shown in the sidebar matrix fields when mirroring is applied --- src/slic3r/GUI/GUI_ObjectManipulation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/GUI_ObjectManipulation.cpp b/src/slic3r/GUI/GUI_ObjectManipulation.cpp index 6c8fdcab7..61e98d542 100644 --- a/src/slic3r/GUI/GUI_ObjectManipulation.cpp +++ b/src/slic3r/GUI/GUI_ObjectManipulation.cpp @@ -179,7 +179,7 @@ void ObjectManipulation::update_settings_value(const Selection& selection) changed_box = true; } if (changed_box || !m_cache.instance.matches_instance(instance_idx) || !m_cache.scale.isApprox(100.0 * m_new_scale)) - m_new_size = volume->get_instance_transformation().get_matrix(true, true) * m_cache.instance.box_size; + m_new_size = (volume->get_instance_transformation().get_matrix(true, true) * m_cache.instance.box_size).cwiseAbs(); } else // this should never happen @@ -209,7 +209,7 @@ void ObjectManipulation::update_settings_value(const Selection& selection) m_new_position = volume->get_volume_offset(); m_new_rotation = volume->get_volume_rotation(); m_new_scale = volume->get_volume_scaling_factor(); - m_new_size = volume->get_volume_transformation().get_matrix(true, true) * volume->bounding_box.size(); + m_new_size = (volume->get_volume_transformation().get_matrix(true, true) * volume->bounding_box.size()).cwiseAbs(); m_new_enabled = true; } else if (wxGetApp().obj_list()->multiple_selection())