First effective implementation of LayerView (both GUI, sorting and

storing in session)
This commit is contained in:
brunoherbelin
2020-05-18 21:58:50 +02:00
parent 80478abde2
commit 530762d1d2
8 changed files with 78 additions and 22 deletions

View File

@@ -206,6 +206,15 @@ void Group::attach(Node *child)
}
void Group::sort()
{
// reorder list of nodes
NodeSet ordered_children;
for(auto it = children_.begin(); it != children_.end(); it++)
ordered_children.insert(*it);
children_.swap(ordered_children);
}
void Group::detatch(Node *child)
{
// find the node with this id, and erase it out of the list of children