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

@ -1107,11 +1107,11 @@ void GLCanvas3D::reset_volumes()
_set_warning_notification(EWarning::ObjectOutside, false);
}
int GLCanvas3D::check_volumes_outside_state() const
ModelInstanceEPrintVolumeState GLCanvas3D::check_volumes_outside_state() const
{
ModelInstanceEPrintVolumeState state;
m_volumes.check_outside_state(m_config, &state);
return (int)state;
return state;
}
void GLCanvas3D::toggle_sla_auxiliaries_visibility(bool visible, const ModelObject* mo, int instance_idx)
@ -2039,9 +2039,10 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re
// checks for geometry outside the print volume to render it accordingly
if (!m_volumes.empty()) {
bool partlyOut = false;
bool fullyOut = false;
const bool contained_min_one = m_volumes.check_outside_state(m_config, partlyOut, fullyOut);
ModelInstanceEPrintVolumeState state;
const bool contained_min_one = m_volumes.check_outside_state(m_config, &state);
const bool partlyOut = (state == ModelInstanceEPrintVolumeState::ModelInstancePVS_Partly_Outside);
const bool fullyOut = (state == ModelInstanceEPrintVolumeState::ModelInstancePVS_Fully_Outside);
_set_warning_notification(EWarning::ObjectClashed, partlyOut);
_set_warning_notification(EWarning::ObjectOutside, fullyOut);
@ -2121,7 +2122,7 @@ void GLCanvas3D::load_sla_preview()
if (m_canvas != nullptr && print != nullptr) {
_set_current();
// Release OpenGL data before generating new data.
this->reset_volumes();
reset_volumes();
_load_sla_shells();
_update_sla_shells_outside_state();
_set_warning_notification_if_needed(EWarning::SlaSupportsOutside);