Added menu Edit -> Select all

This commit is contained in:
Enrico Turri 2018-11-21 15:28:35 +01:00
parent c6b597b813
commit 681beeadf6
10 changed files with 77 additions and 8 deletions

View file

@ -1315,6 +1315,22 @@ void GLCanvas3D::Selection::remove_volume(unsigned int object_idx, unsigned int
m_bounding_box_dirty = true;
}
void GLCanvas3D::Selection::add_all()
{
if (!m_valid)
return;
m_mode = Instance;
for (unsigned int i = 0; i < (unsigned int)m_volumes->size(); ++i)
{
_add_volume(i);
}
_update_type();
m_bounding_box_dirty = true;
}
void GLCanvas3D::Selection::clear()
{
if (!m_valid)
@ -3687,6 +3703,11 @@ void GLCanvas3D::render()
m_canvas->SwapBuffers();
}
void GLCanvas3D::select_all()
{
m_selection.add_all();
}
void GLCanvas3D::delete_selected()
{
m_selection.erase();