Deactivate current gizmo if user delete all objects from the scene

This commit is contained in:
Enrico Turri 2019-01-10 14:43:07 +01:00
parent e5062e8662
commit ad245a0021

View File

@ -4675,6 +4675,11 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re
m_camera.set_scene_box(scene_bounding_box(), *this); m_camera.set_scene_box(scene_bounding_box(), *this);
m_camera.set_target(m_camera.get_target(), *this); m_camera.set_target(m_camera.get_target(), *this);
// if no object is selected, deactivate active gizmo, if any
// otherwise it will be shown after cleaning the scene (while it is active)
if (m_selection.is_empty())
m_gizmos.reset_all_states();
// and force this canvas to be redrawn. // and force this canvas to be redrawn.
m_dirty = true; m_dirty = true;
} }