From 014e0ac8c92b57c55073ae05fd6e8bd371a94aea Mon Sep 17 00:00:00 2001 From: ocornut Date: Tue, 20 Feb 2024 14:01:24 +0100 Subject: [PATCH] Menus, Popups: Fixed an issue where hovering a parent-menu upward would erroneously close the window. (#7325, #7287, #7063) Amend 76e09c4b0. Initial call to ClosePopupToLevel d31fe97f7 (#2880). See "widgets_menu_reopen_2" in TestSuite. --- docs/CHANGELOG.txt | 2 ++ imgui.cpp | 2 +- imgui.h | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 8509a35bda0e..f394b9da0ab0 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -43,6 +43,8 @@ Breaking changes: Other changes: +- Menus, Popups: Fixed an issue where hovering a parent-menu upward would + erroneously close the window. (#7325, #7287, #7063) - Tables: Angled headers: fixed support for multi-line labels. (#6917) - Tables: Angled headers: various fixes to accurately handle CellPadding changes. (#6917) - Tables: Angled headers: properly registers horizontal component of angled headers diff --git a/imgui.cpp b/imgui.cpp index e4d0bcba03e0..c48c1ebefee4 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -10797,7 +10797,7 @@ void ImGui::OpenPopupEx(ImGuiID id, ImGuiPopupFlags popup_flags) else { // Reopen: close child popups if any, then flag popup for open/reopen (set position, focus, init navigation) - ClosePopupToLevel(current_stack_size, false); + ClosePopupToLevel(current_stack_size, true); g.OpenPopupStack.push_back(popup_ref); } diff --git a/imgui.h b/imgui.h index 13d39775e962..615e34039cfb 100644 --- a/imgui.h +++ b/imgui.h @@ -24,7 +24,7 @@ // Library Version // (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345') #define IMGUI_VERSION "1.90.4 WIP" -#define IMGUI_VERSION_NUM 19031 +#define IMGUI_VERSION_NUM 19032 #define IMGUI_HAS_TABLE /*