summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2022-12-29 01:59:05 +0100
committerMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2022-12-29 01:59:05 +0100
commitc5c40f4f2319097940fffca7c43fb9c0327967d5 (patch)
tree5bdac4710fddc7dbc9f26473b2db79119333c3f5 /scene/gui
parent7e1bd3f95a10acf60e07a8a6518cc80bfee6fbbf (diff)
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.
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/menu_bar.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/gui/menu_bar.cpp b/scene/gui/menu_bar.cpp
index 82ef53e317..3c404c65b5 100644
--- a/scene/gui/menu_bar.cpp
+++ b/scene/gui/menu_bar.cpp
@@ -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: