ENABLE_3DCONNEXION_DEVICES -> Update 3D scene only when mouse 3D device send update messages

This commit is contained in:
Enrico Turri 2019-10-07 09:31:23 +02:00
parent 5a94ac9499
commit 0ba9fbaf0c
2 changed files with 18 additions and 4 deletions

View file

@ -2323,8 +2323,7 @@ void GLCanvas3D::on_idle(wxIdleEvent& evt)
m_dirty |= m_undoredo_toolbar.update_items_state();
m_dirty |= m_view_toolbar.update_items_state();
#if ENABLE_3DCONNEXION_DEVICES
bool mouse3d_controller_applied = wxGetApp().plater()->get_mouse3d_controller().apply(m_camera);
m_dirty |= mouse3d_controller_applied;
m_dirty |= wxGetApp().plater()->get_mouse3d_controller().apply(m_camera);
#endif // ENABLE_3DCONNEXION_DEVICES
if (!m_dirty)
@ -2333,7 +2332,7 @@ void GLCanvas3D::on_idle(wxIdleEvent& evt)
_refresh_if_shown_on_screen();
#if ENABLE_3DCONNEXION_DEVICES
if (m_keep_dirty || wxGetApp().plater()->get_mouse3d_controller().is_device_connected())
if (m_keep_dirty)
{
m_dirty = true;
evt.RequestMore();