| 5437 | } |
| 5438 | |
| 5439 | TreeItem *Tree::get_next_selected(TreeItem *p_item) { |
| 5440 | if (!root) { |
| 5441 | return nullptr; |
| 5442 | } |
| 5443 | |
| 5444 | while (true) { |
| 5445 | if (!p_item) { |
| 5446 | p_item = root; |
| 5447 | } else { |
| 5448 | if (p_item->first_child) { |
| 5449 | p_item = p_item->first_child; |
| 5450 | |
| 5451 | } else if (p_item->next) { |
| 5452 | p_item = p_item->next; |
| 5453 | } else { |
| 5454 | while (!p_item->next) { |
| 5455 | p_item = p_item->parent; |
| 5456 | if (p_item == nullptr) { |
| 5457 | return nullptr; |
| 5458 | } |
| 5459 | } |
| 5460 | |
| 5461 | p_item = p_item->next; |
| 5462 | } |
| 5463 | } |
| 5464 | |
| 5465 | for (int i = 0; i < columns.size(); i++) { |
| 5466 | if (p_item->cells[i].selected) { |
| 5467 | return p_item; |
| 5468 | } |
| 5469 | } |
| 5470 | } |
| 5471 | |
| 5472 | return nullptr; |
| 5473 | } |
| 5474 | |
| 5475 | int Tree::get_column_minimum_width(int p_column) const { |
| 5476 | ERR_FAIL_INDEX_V(p_column, columns.size(), -1); |
no test coverage detected