| 196 | } |
| 197 | |
| 198 | void Node::removeChild(int alt) |
| 199 | { |
| 200 | auto kids = childrenCount(); |
| 201 | |
| 202 | /// Note: only works for two kids for now |
| 203 | if (kids == 2) |
| 204 | { |
| 205 | /// move second child to first position |
| 206 | if (alt == 0) |
| 207 | { |
| 208 | const auto rkid = getChild(1); |
| 209 | setChild(rkid, 0); |
| 210 | } |
| 211 | |
| 212 | setTag(Tag::ONE_CHILD); |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | Node::~Node() |
| 217 | { |