| 480 | } |
| 481 | |
| 482 | void TreeControl::notifyExpandCollapse(Widget* pSender) |
| 483 | { |
| 484 | TreeControlItem* pItem = pSender->getParent()->castType<TreeControlItem>(false); |
| 485 | if (!pItem) |
| 486 | return; |
| 487 | |
| 488 | Node* pNode = pItem->getNode(); |
| 489 | pNode->setExpanded(!pNode->isExpanded()); |
| 490 | |
| 491 | if (!pNode->isExpanded() && mpSelection && mpSelection->hasAncestor(pNode)) |
| 492 | { |
| 493 | mpSelection = pNode; |
| 494 | eventTreeNodeSelected(this, mpSelection); |
| 495 | } |
| 496 | |
| 497 | invalidate(); |
| 498 | } |
| 499 | } |
nothing calls this directly
no test coverage detected