Tech ENABLE_PROCESS_G2_G3_LINES - Fixed update of horizontal slider in gcode preview

This commit is contained in:
enricoturri1966 2022-03-25 14:03:44 +01:00
parent ea3e3f95b1
commit 888f45c0d3

View File

@ -887,7 +887,7 @@ void Preview::update_moves_slider()
m_moves_slider->SetSliderValues(values);
m_moves_slider->SetSliderAlternateValues(alternate_values);
m_moves_slider->SetMaxValue(int(values.size()) - 1);
m_moves_slider->SetSelectionSpan(values.front() - 1, values.back() - 1);
m_moves_slider->SetSelectionSpan(values.front() - 1 - view.endpoints.first, values.back() - 1 - view.endpoints.first);
#else
std::vector<double> values(view.endpoints.last - view.endpoints.first + 1);
std::vector<double> alternate_values(view.endpoints.last - view.endpoints.first + 1);