SPE-2595 - Fixed update of shells in preview

This commit is contained in:
enricoturri1966 2024-12-02 09:46:10 +01:00 committed by Lukas Matena
parent 3afe7f77e0
commit 75274707c9
3 changed files with 2 additions and 7 deletions

View File

@ -283,11 +283,6 @@ void Preview::set_drop_target(wxDropTarget* target)
SetDropTarget(target);
}
void Preview::load_gcode_shells()
{
m_canvas->load_gcode_shells();
}
void Preview::load_print(bool keep_z_range)
{
PrinterTechnology tech = m_process->current_printer_technology();
@ -944,6 +939,7 @@ void Preview::load_print_as_fff(bool keep_z_range)
if (wxGetApp().is_editor() && !has_layers) {
m_canvas->reset_gcode_layers_times_cache();
m_canvas->load_gcode_shells();
hide_layers_slider();
m_moves_slider->Hide();
m_canvas_widget->Refresh();
@ -979,6 +975,7 @@ void Preview::load_print_as_fff(bool keep_z_range)
else if (is_pregcode_preview) {
// Load the initial preview based on slices, not the final G-code.
m_canvas->load_preview(tool_colors, color_print_colors, color_print_values);
m_canvas->load_gcode_shells();
// the view type has been changed by the call m_canvas->load_gcode_preview()
if (gcode_view_type == libvgcode::EViewType::ColorPrint && !color_print_values.empty())
m_canvas->set_gcode_view_type(gcode_view_type);

View File

@ -131,7 +131,6 @@ public:
void select_view(const std::string& direction);
void set_drop_target(wxDropTarget* target);
void load_gcode_shells();
void load_print(bool keep_z_range = false);
void reload_print();

View File

@ -2981,7 +2981,6 @@ void Plater::priv::set_current_panel(wxPanel* panel)
bool model_fits = view3D->get_canvas3d()->check_volumes_outside_state() != ModelInstancePVS_Partly_Outside;
if (s_multiple_beds.is_bed_occupied(s_multiple_beds.get_active_bed()) && !model.objects.empty() && !export_in_progress && model_fits) {
preview->get_canvas3d()->init_gcode_viewer();
preview->load_gcode_shells();
q->reslice();
}
// keeps current gcode preview, if any