| 84 | } |
| 85 | |
| 86 | void MenuItem::doAction(bool consume) { |
| 87 | widget::EventContext cAction; |
| 88 | ActionEvent eAction; |
| 89 | eAction.context = &cAction; |
| 90 | if (consume) { |
| 91 | eAction.consume(this); |
| 92 | } |
| 93 | onAction(eAction); |
| 94 | if (!cAction.consumed) |
| 95 | return; |
| 96 | |
| 97 | // Close menu |
| 98 | MenuOverlay* overlay = getAncestorOfType<MenuOverlay>(); |
| 99 | if (overlay) { |
| 100 | overlay->requestDelete(); |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | |
| 105 | void MenuItem::onAction(const ActionEvent& e) { |
no test coverage detected