This commit is contained in:
Enrico Turri 2019-04-03 15:28:27 +02:00
commit 305b07978c
2 changed files with 20 additions and 2 deletions

View File

@ -330,8 +330,12 @@ bool GLGizmoSlaSupports::gizmo_event(SLAGizmoEventType action, const Vec2d& mous
m_canvas_width = m_parent.get_canvas_size().get_width();
m_canvas_height = m_parent.get_canvas_size().get_height();
}
else
select_point(m_hover_id);
else {
if (m_editing_mode_cache[m_hover_id].selected)
unselect_point(m_hover_id);
else
select_point(m_hover_id);
}
return true;
}
@ -791,6 +795,19 @@ void GLGizmoSlaSupports::select_point(int i)
}
void GLGizmoSlaSupports::unselect_point(int i)
{
m_editing_mode_cache[i].selected = false;
m_selection_empty = true;
for (const CacheEntry& ce : m_editing_mode_cache) {
if (ce.selected) {
m_selection_empty = false;
break;
}
}
}
void GLGizmoSlaSupports::editing_mode_discard_changes()
{

View File

@ -93,6 +93,7 @@ private:
NoPoints,
};
void select_point(int i);
void unselect_point(int i);
void editing_mode_apply_changes();
void editing_mode_discard_changes();
void editing_mode_reload_cache();