Fix #147684: Close Tooltips When Out of Menu Bounds

With #145523 it is possible to have a tooltip open on a menu or popup
and it will not go away when expected. This PR removes any tooltips if
you move out of the menu item bounds.

Pull Request: https://projects.blender.org/blender/blender/pulls/148099
This commit is contained in:
Harley Acheson
2025-10-15 03:14:17 +02:00
committed by Harley Acheson
parent b3ba6465f4
commit 75e06730a8

View File

@@ -11223,6 +11223,10 @@ static int ui_handle_menu_event(bContext *C,
if ((inside == false) && (menu->menuretval == 0)) {
uiSafetyRct *saferct = static_cast<uiSafetyRct *>(block->saferct.first);
if (event->type == MOUSEMOVE) {
WM_tooltip_clear(C, win);
}
if (ELEM(event->type, LEFTMOUSE, MIDDLEMOUSE, RIGHTMOUSE)) {
if (ELEM(event->val, KM_PRESS, KM_DBL_CLICK)) {
if ((is_parent_menu == false) && (U.uiflag & USER_MENUOPENAUTO) == 0) {