Do not automatically start slicing when switching to gcode preview if the Slice Now button is disabled

This commit is contained in:
Enrico Turri 2019-08-29 15:38:21 +02:00
parent d60480ca7c
commit 05c4976232

View file

@ -3179,6 +3179,11 @@ void Plater::priv::set_current_panel(wxPanel* panel)
} }
else if (current_panel == preview) else if (current_panel == preview)
{ {
// see: Plater::priv::object_list_changed()
// FIXME: it may be better to have a single function making this check and let it be called wherever needed
bool export_in_progress = this->background_process.is_export_scheduled();
bool model_fits = view3D->check_volumes_outside_state() != ModelInstance::PVS_Partly_Outside;
if (!model.objects.empty() && !export_in_progress && model_fits)
this->q->reslice(); this->q->reslice();
// keeps current gcode preview, if any // keeps current gcode preview, if any
preview->reload_print(true); preview->reload_print(true);