update tests for menu closed event and call cancel on closePopup

This commit is contained in:
Heilig Benedek 2017-11-28 02:29:37 +01:00 committed by Cheng Zhao
parent 14b65467d8
commit ef7357dedc
2 changed files with 11 additions and 4 deletions

View file

@ -60,6 +60,8 @@ void MenuViews::PopupAt(Window* window, int x, int y, int positioning_item) {
}
void MenuViews::ClosePopupAt(int32_t window_id) {
if (menu_runners_[window_id])
menu_runners_[window_id]->Cancel();
menu_runners_.erase(window_id);
}