From b112d73edbf7637a4993baa9a8428dd58c79f45b Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 29 Nov 2023 17:08:06 +0100 Subject: [PATCH] Menus: amend to clarify/fix static analyzer warning. (#6671, #6926) --- imgui_widgets.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index a4582fafa..a0a1b79f7 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp @@ -7536,11 +7536,12 @@ bool ImGui::BeginMenuEx(const char* label, const char* icon, bool enabled) want_close = true; // Open + // (note: at this point 'hovered' actually includes the NavDisableMouseHover == false test) if (!menu_is_open && pressed) // Click/activate to open want_open = true; else if (!menu_is_open && hovered && !moving_toward_child_menu) // Hover to open want_open = true; - else if (!menu_is_open && hovered && !g.NavDisableMouseHover && g.HoveredIdTimer >= 0.30f && g.MouseStationaryTimer >= 0.30f) // Hover to open (timer fallback) + else if (!menu_is_open && hovered && g.HoveredIdTimer >= 0.30f && g.MouseStationaryTimer >= 0.30f) // Hover to open (timer fallback) want_open = true; if (g.NavId == id && g.NavMoveDir == ImGuiDir_Right) // Nav-Right to open {