-------------------------- Outliner::RecursiveGetChild
| 230 | // Outliner::RecursiveGetChild |
| 231 | // |
| 232 | Gtk::TreeModel::Row Outliner::RecursiveGetChild(fw::T_EntityId const entity, Gtk::TreeModel::Children const& children) const |
| 233 | { |
| 234 | for (Gtk::TreeModel::Children::iterator it = children.begin(); it != children.end(); ++it) |
| 235 | { |
| 236 | Gtk::TreeModel::Row row = *it; |
| 237 | if (row[m_Columns.m_Id] == entity) |
| 238 | { |
| 239 | return row; |
| 240 | } |
| 241 | |
| 242 | row = RecursiveGetChild(entity, it->children()); |
| 243 | if (row) |
| 244 | { |
| 245 | return row; |
| 246 | } |
| 247 | } |
| 248 | |
| 249 | return *(children.end()); |
| 250 | } |
| 251 | |
| 252 | |
| 253 | } // namespace edit |