From 4fab72b40e2972f5d56fc884ed5797446238844e Mon Sep 17 00:00:00 2001 From: ocornut Date: Fri, 9 Jun 2023 14:01:21 +0200 Subject: [PATCH] BeginChild/Tables: Fixed BeginChild temporary activation id collision. Fixes regression in 1.89.6 leading to the first column of tables with either ScrollX or ScrollY flags from being impossible to resize. (#6503) --- docs/CHANGELOG.txt | 5 +++++ imgui.cpp | 2 +- imgui.h | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 24f148292..7a5a648c4 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -34,6 +34,11 @@ HOW TO UPDATE? VERSION 1.89.7 WIP (In Progress) ----------------------------------------------------------------------- +Other changes: + +- Tables: Fixed a regression in 1.89.6 leading to the first column of tables with either + ScrollX or ScrollY flags from being impossible to resize. (#6503) + ----------------------------------------------------------------------- VERSION 1.89.6 (Released 2023-05-31) diff --git a/imgui.cpp b/imgui.cpp index b7ca1fa2e..22a1e873e 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -5322,7 +5322,7 @@ bool ImGui::BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, b // Process navigation-in immediately so NavInit can run on first frame // Can enter a child if (A) it has navigatable items or (B) it can be scrolled. - const ImGuiID temp_id_for_activation = (id + 1); + const ImGuiID temp_id_for_activation = ImHashStr("##Child", 0, id); if (g.ActiveId == temp_id_for_activation) ClearActiveID(); if (g.NavActivateId == id && !(flags & ImGuiWindowFlags_NavFlattened) && (child_window->DC.NavLayersActiveMask != 0 || child_window->DC.NavWindowHasScrollY)) diff --git a/imgui.h b/imgui.h index 3aa6b6f8f..34420a0b0 100644 --- a/imgui.h +++ b/imgui.h @@ -23,7 +23,7 @@ // Library Version // (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345') #define IMGUI_VERSION "1.89.7 WIP" -#define IMGUI_VERSION_NUM 18961 +#define IMGUI_VERSION_NUM 18962 #define IMGUI_HAS_TABLE /*