Sidebar matrix field behavior for multiple volume selection

This commit is contained in:
Enrico Turri 2018-12-18 14:08:46 +01:00
parent d6b8ed3e3e
commit 7077c1e4a1
3 changed files with 13 additions and 3 deletions

View file

@ -261,6 +261,8 @@ void ObjectManipulation::update_settings_value(const GLCanvas3D::Selection& sele
{
reset_settings_value();
move_label = _(L("Translate:"));
rotate_label = _(L("Rotate:"));
scale_label = _(L("Scale:"));
update_size_value(selection.get_bounding_box().size());
m_og->enable();
}
@ -386,9 +388,7 @@ void ObjectManipulation::change_scale_value(const Vec3d& scale)
{
Vec3d scaling_factor = scale;
const GLCanvas3D::Selection& selection = wxGetApp().plater()->canvas3D()->get_selection();
bool needs_uniform_scale = selection.is_single_full_object() && !selection.is_single_full_instance();
if (needs_uniform_scale)
if (selection.requires_uniform_scale())
{
Vec3d abs_scale_diff = (scale - cache_scale).cwiseAbs();
double max_diff = abs_scale_diff(X);