FIX: preview tick should reset in some case(STUDIO-2621)

Switch to ByObject or switch spiral vase mode, should clear all preview
tick because they are invalid and doesn't work.

Change-Id: If68e9ebe4e915286a34e2e1003b281d770f0864c
This commit is contained in:
liz.li 2023-04-04 10:45:45 +08:00 committed by Lane.Wei
parent f704dbf8d8
commit acae9fc088
2 changed files with 31 additions and 3 deletions

View file

@ -581,12 +581,13 @@ void Preview::update_layers_slider(const std::vector<double>& layers_z, bool kee
}
}
m_layers_slider->SetSelectionSpan(idx_low, idx_high);
m_layers_slider->SetTicksValues(ticks_info_from_curr_plate);
auto curr_plate = wxGetApp().plater()->get_partplate_list().get_curr_plate();
auto curr_print_seq = curr_plate->get_real_print_seq();
bool sequential_print = (curr_print_seq == PrintSequence::ByObject);
m_layers_slider->SetDrawMode(sequential_print);
m_layers_slider->SetTicksValues(ticks_info_from_curr_plate);
auto print_mode_stat = m_gcode_result->print_statistics.modes.front();
m_layers_slider->SetLayersTimes(print_mode_stat.layers_times, print_mode_stat.time);