Removed duplicated method GLVolumeCollection::check_outside_state()

This commit is contained in:
enricoturri1966 2021-09-10 08:27:03 +02:00
parent ff82c82f52
commit 8bd0f8ada9
7 changed files with 22 additions and 73 deletions

View file

@ -2724,7 +2724,7 @@ void Plater::priv::object_list_changed()
{
const bool export_in_progress = this->background_process.is_export_scheduled(); // || ! send_gcode_file.empty());
// XXX: is this right?
const bool model_fits = view3D->check_volumes_outside_state() == ModelInstancePVS_Inside;
const bool model_fits = view3D->get_canvas3d()->check_volumes_outside_state() == ModelInstancePVS_Inside;
sidebar->enable_buttons(!model.objects.empty() && !export_in_progress && model_fits);
}
@ -3664,7 +3664,7 @@ void Plater::priv::set_current_panel(wxPanel* panel)
// 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() != ModelInstancePVS_Partly_Outside;
bool model_fits = view3D->get_canvas3d()->check_volumes_outside_state() != ModelInstancePVS_Partly_Outside;
if (!model.objects.empty() && !export_in_progress && model_fits)
this->q->reslice();
// keeps current gcode preview, if any