added icons and popup menus

This commit is contained in:
2017-02-21 23:14:34 +00:00
parent a2714f513a
commit 75f1b96b4f
5 changed files with 126 additions and 19 deletions

View File

@@ -72,12 +72,12 @@ void Node::add_child(Node* n)
void Node::remove_child(Node* n)
{
auto i = std::find_if(m_children.begin(), m_children.end(), [=](std::unique_ptr<Node>& ptr)
{
return ptr.get() == n;
});
m_children.erase(i);
YGNodeRemoveChild(y_node, n->y_node);
auto i = std::find_if(m_children.begin(), m_children.end(), [=](std::unique_ptr<Node>& ptr) { return ptr.get() == n; });
if (i != m_children.end())
{
m_children.erase(i);
YGNodeRemoveChild(y_node, n->y_node);
}
}
void Node::update(float width, float height)