ENABLE_3DCONNEXION_DEVICES -> Refactored Mouse3DController to be unaware of current active GLCanvas3D

This commit is contained in:
Enrico Turri 2019-10-03 11:38:31 +02:00
parent a554304038
commit 587effbedf
8 changed files with 75 additions and 42 deletions

View file

@ -3263,10 +3263,6 @@ void Plater::priv::set_current_panel(wxPanel* panel)
view3D->reload_scene(true);
}
#if ENABLE_3DCONNEXION_DEVICES
mouse3d_controller.set_canvas(view3D->get_canvas3d());
#endif // ENABLE_3DCONNEXION_DEVICES
// sets the canvas as dirty to force a render at the 1st idle event (wxWidgets IsShownOnScreen() is buggy and cannot be used reliably)
view3D->set_as_dirty();
view_toolbar.select_item("3D");
@ -3282,10 +3278,6 @@ void Plater::priv::set_current_panel(wxPanel* panel)
// keeps current gcode preview, if any
preview->reload_print(true);
#if ENABLE_3DCONNEXION_DEVICES
mouse3d_controller.set_canvas(preview->get_canvas3d());
#endif // ENABLE_3DCONNEXION_DEVICES
preview->set_canvas_as_dirty();
view_toolbar.select_item("Preview");
}