ENH: do not adjust camera when entering paint gizmo

Change-Id: I1510a57af7c2a5cea96346681dac4865f533d335
This commit is contained in:
Stone Li 2022-11-01 14:40:16 +08:00 committed by Lane.Wei
parent 20702af590
commit db8a66e49e

View file

@ -877,12 +877,12 @@ void GLGizmoPainterBase::on_set_state()
on_opening(); on_opening();
const Selection& selection = m_parent.get_selection(); const Selection& selection = m_parent.get_selection();
Camera& camera = wxGetApp().plater()->get_camera(); //Camera& camera = wxGetApp().plater()->get_camera();
Vec3d rotate_target = selection.get_bounding_box().center(); //Vec3d rotate_target = selection.get_bounding_box().center();
rotate_target(2) = 0.f; //rotate_target(2) = 0.f;
Vec3d position = camera.get_position(); //Vec3d position = camera.get_position();
//camera.set_target(rotate_target); //camera.set_target(rotate_target);
camera.look_at(position, rotate_target, Vec3d::UnitZ()); //camera.look_at(position, rotate_target, Vec3d::UnitZ());
} }
if (m_state == Off && m_old_state != Off) { // the gizmo was just turned Off if (m_state == Off && m_old_state != Off) { // the gizmo was just turned Off
// we are actually shutting down // we are actually shutting down