diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index fb0768e75..a65478bdc 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -1804,10 +1804,12 @@ static double rotation_diff_z(const Vec3d &rot_xyz_from, const Vec3d &rot_xyz_to void GLCanvas3D::Selection::rotate(const Vec3d& rotation, bool local) { - int rot_axis_max; - if (!m_valid || rotation.cwiseAbs().maxCoeff(&rot_axis_max) < EPSILON) + if (!m_valid) return; + int rot_axis_max; + rotation.cwiseAbs().maxCoeff(&rot_axis_max); + // For generic rotation, we want to rotate the first volume in selection, and then to synchronize the other volumes with it. std::vector object_instance_first(m_model->objects.size(), -1); auto rotate_instance = [this, &rotation, &object_instance_first, rot_axis_max, local](GLVolume &volume, int i) {