Fix hovering-color of MenuBar entries when reentering MenuBar

When reentering MenuBar with the mouse cursor, the hovering-color was
not set, because the previously hovered entry was still referenced in
selected_menu. This PR resets selected_menu on mouse-exit.
This commit is contained in:
Markus Sauermann 2022-12-29 01:59:05 +01:00
parent 7e1bd3f95a
commit c5c40f4f23

View File

@ -345,6 +345,7 @@ void MenuBar::_notification(int p_what) {
} break;
case NOTIFICATION_MOUSE_EXIT: {
focused_menu = -1;
selected_menu = -1;
queue_redraw();
} break;
case NOTIFICATION_TRANSLATION_CHANGED: