ENH:optimize method of gcodeviewer marker get current move

Change-Id: I935d8da52212156b4158d727b49d8b0e51105fa3
(cherry picked from commit 4826570649608691184c05260edf4c074dccb780)
This commit is contained in:
liz.li 2023-01-10 17:30:57 +08:00 committed by Lane.Wei
parent 70a0f09ea2
commit fdba5967fa
3 changed files with 33 additions and 21 deletions

View file

@ -6638,12 +6638,14 @@ void GLCanvas3D::_render_gcode(int canvas_width, int canvas_height)
}
layers_slider->set_as_dirty(false);
post_event(SimpleEvent(EVT_GLCANVAS_UPDATE));
m_gcode_viewer.update_marker_curr_move();
}
if (moves_slider->is_dirty()) {
moves_slider->set_as_dirty(false);
m_gcode_viewer.update_sequential_view_current((moves_slider->GetLowerValueD() - 1.0), static_cast<unsigned int>(moves_slider->GetHigherValueD() - 1.0));
post_event(SimpleEvent(EVT_GLCANVAS_UPDATE));
m_gcode_viewer.update_marker_curr_move();
}
}