Fixed assert showing up after merge with master

This commit is contained in:
enricoturri1966 2023-04-03 11:39:53 +02:00
parent c5b224c0c1
commit d1c959529c

View File

@ -1742,18 +1742,11 @@ std::vector<unsigned int> Selection::get_volume_idxs_from_object(unsigned int ob
std::vector<unsigned int> Selection::get_volume_idxs_from_instance(unsigned int object_idx, unsigned int instance_idx) const
{
std::vector<unsigned int> idxs;
const PrinterTechnology pt = wxGetApp().plater()->printer_technology();
for (unsigned int i = 0; i < (unsigned int)m_volumes->size(); ++i) {
const GLVolume* v = (*m_volumes)[i];
const ModelVolume *mv = get_model_volume(*v, *m_model);
if (pt == ptSLA && v->is_modifier && mv && mv->is_modifier())
continue;
if (v->object_idx() == (int)object_idx && v->instance_idx() == (int)instance_idx)
idxs.push_back(i);
}
return idxs;
}
@ -1761,8 +1754,7 @@ std::vector<unsigned int> Selection::get_volume_idxs_from_volume(unsigned int ob
{
std::vector<unsigned int> idxs;
for (unsigned int i = 0; i < (unsigned int)m_volumes->size(); ++i)
{
for (unsigned int i = 0; i < (unsigned int)m_volumes->size(); ++i) {
const GLVolume* v = (*m_volumes)[i];
if (v->object_idx() == (int)object_idx && v->volume_idx() == (int)volume_idx) {
if ((int)instance_idx != -1 && v->instance_idx() == (int)instance_idx)