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 authored and Lane.Wei committed 2023-04-17 15:39:02 +08:00
1 parent f704dbf8d8
commit acae9fc088
2 files changed
+31 -3

No files matched your search

+2 -1
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);