Fixed conflicts after merge with master

This commit is contained in:
enricoturri1966 2021-10-20 13:22:36 +02:00
commit 9dc7612f31
3 changed files with 22 additions and 1 deletions

View File

@ -2568,12 +2568,15 @@ void GLCanvas3D::on_key(wxKeyEvent& evt)
if (camera_space) { if (camera_space) {
Eigen::Matrix<double, 3, 3, Eigen::DontAlign> inv_view_3x3 = wxGetApp().plater()->get_camera().get_view_matrix().inverse().matrix().block(0, 0, 3, 3); Eigen::Matrix<double, 3, 3, Eigen::DontAlign> inv_view_3x3 = wxGetApp().plater()->get_camera().get_view_matrix().inverse().matrix().block(0, 0, 3, 3);
displacement = multiplier * (inv_view_3x3 * direction); displacement = multiplier * (inv_view_3x3 * direction);
displacement(2) = 0.0; displacement.z() = 0.0;
} }
else else
displacement = multiplier * direction; displacement = multiplier * direction;
m_selection.translate(displacement); m_selection.translate(displacement);
#if ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
m_selection.stop_dragging();
#endif // ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
m_dirty = true; m_dirty = true;
} }
); );
@ -2672,6 +2675,9 @@ void GLCanvas3D::on_key(wxKeyEvent& evt)
auto do_rotate = [this](double angle_z_rad) { auto do_rotate = [this](double angle_z_rad) {
m_selection.start_dragging(); m_selection.start_dragging();
m_selection.rotate(Vec3d(0.0, 0.0, angle_z_rad), TransformationType(TransformationType::World_Relative_Joint)); m_selection.rotate(Vec3d(0.0, 0.0, angle_z_rad), TransformationType(TransformationType::World_Relative_Joint));
#if ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
m_selection.stop_dragging();
#endif // ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
m_dirty = true; m_dirty = true;
// wxGetApp().obj_manipul()->set_dirty(); // wxGetApp().obj_manipul()->set_dirty();
}; };

View File

@ -910,6 +910,9 @@ void ObjectManipulation::change_position_value(int axis, double value)
#else #else
selection.translate(position - m_cache.position, selection.requires_local_axes()); selection.translate(position - m_cache.position, selection.requires_local_axes());
#endif // ENABLE_WORLD_COORDINATE #endif // ENABLE_WORLD_COORDINATE
#if ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
selection.stop_dragging();
#endif // ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
canvas->do_move(L("Set Position")); canvas->do_move(L("Set Position"));
m_cache.position = position; m_cache.position = position;
@ -952,6 +955,9 @@ void ObjectManipulation::change_rotation_value(int axis, double value)
selection.rotate( selection.rotate(
(M_PI / 180.0) * (transformation_type.absolute() ? rotation : rotation - m_cache.rotation), (M_PI / 180.0) * (transformation_type.absolute() ? rotation : rotation - m_cache.rotation),
transformation_type); transformation_type);
#if ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
selection.stop_dragging();
#endif // ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
canvas->do_rotate(L("Set Orientation")); canvas->do_rotate(L("Set Orientation"));
m_cache.rotation = rotation; m_cache.rotation = rotation;
@ -1024,6 +1030,9 @@ void ObjectManipulation::do_scale(int axis, const Vec3d &scale) const
selection.start_dragging(); selection.start_dragging();
selection.scale(scaling_factor, transformation_type); selection.scale(scaling_factor, transformation_type);
#if ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
selection.stop_dragging();
#endif // ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
wxGetApp().plater()->canvas3D()->do_scale(L("Set Scale")); wxGetApp().plater()->canvas3D()->do_scale(L("Set Scale"));
} }

View File

@ -732,6 +732,12 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt)
gizmo_event(SLAGizmoEventType::RightUp, mouse_pos, evt.ShiftDown(), evt.AltDown(), control_down); gizmo_event(SLAGizmoEventType::RightUp, mouse_pos, evt.ShiftDown(), evt.AltDown(), control_down);
processed = true; processed = true;
} }
#if ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
else if (evt.LeftUp()) {
selection.stop_dragging();
wxGetApp().obj_manipul()->set_dirty();
}
#endif // ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
} }
else { else {
// mouse inside toolbar // mouse inside toolbar