G-code window uses file mapping

This commit is contained in:
enricoturri1966
2021-03-08 08:35:32 +01:00
parent 252aa9b229
commit 0472c84525
7 changed files with 159 additions and 36 deletions

View File

@@ -3379,7 +3379,9 @@ void Plater::priv::set_current_panel(wxPanel* panel)
if (current_panel == view3D) {
#if ENABLE_GCODE_WINDOW
if (old_panel == preview) {
#if !ENABLE_GCODE_WINDOW_USE_MAPPED_FILE
preview->get_canvas3d()->stop_mapping_gcode_file();
#endif // !ENABLE_GCODE_WINDOW_USE_MAPPED_FILE
preview->get_canvas3d()->unbind_event_handlers();
}
#else
@@ -3411,7 +3413,9 @@ void Plater::priv::set_current_panel(wxPanel* panel)
preview->get_canvas3d()->bind_event_handlers();
#if ENABLE_GCODE_WINDOW
#if !ENABLE_GCODE_WINDOW_USE_MAPPED_FILE
preview->get_canvas3d()->start_mapping_gcode_file();
#endif // !ENABLE_GCODE_WINDOW_USE_MAPPED_FILE
#endif // ENABLE_GCODE_WINDOW
// see: Plater::priv::object_list_changed()