| 248 | } |
| 249 | |
| 250 | void EditorWidgets::add(WidgetContainer* _container) |
| 251 | { |
| 252 | if (nullptr == _container->getWidget()->getParent()) |
| 253 | { |
| 254 | mWidgets.push_back(_container); |
| 255 | } |
| 256 | else |
| 257 | { |
| 258 | MyGUI::Widget* parent = _container->getWidget()->getParent(); |
| 259 | WidgetContainer* containerParent = find(parent); |
| 260 | while (nullptr == containerParent) |
| 261 | { |
| 262 | parent = parent->getParent(); |
| 263 | if (parent == nullptr) |
| 264 | return; |
| 265 | containerParent = find(parent); |
| 266 | } |
| 267 | containerParent->childContainers.push_back(_container); |
| 268 | } |
| 269 | mWidgetsChanged = true; |
| 270 | } |
| 271 | |
| 272 | void EditorWidgets::remove(MyGUI::Widget* _widget) |
| 273 | { |
no test coverage detected