3DScene volume selection methods moved to c++

This commit is contained in:
Enrico Turri 2018-05-25 09:03:55 +02:00
parent f121817501
commit bdbc86167c
10 changed files with 96 additions and 22 deletions

View file

@ -992,6 +992,28 @@ void GLCanvas3D::reset_volumes()
}
}
void GLCanvas3D::deselect_volumes()
{
if (m_volumes != nullptr)
{
for (GLVolume* vol : m_volumes->volumes)
{
if (vol != nullptr)
vol->selected = false;
}
}
}
void GLCanvas3D::select_volume(unsigned int id)
{
if ((m_volumes != nullptr) && (id < (unsigned int)m_volumes->volumes.size()))
{
GLVolume* vol = m_volumes->volumes[id];
if (vol != nullptr)
vol->selected = true;
}
}
DynamicPrintConfig* GLCanvas3D::get_config()
{
return m_config;