From f58bd817e2998489bace1b2dff49884eac790efb Mon Sep 17 00:00:00 2001 From: Rokas Kupstys Date: Tue, 31 May 2022 14:37:57 +0300 Subject: [PATCH] Tables: Fix drawcall merging of last column. (#4843, #4844) Amend 83d22f4e --- docs/CHANGELOG.txt | 2 ++ imgui.h | 2 +- imgui_tables.cpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 5211bf5c1..cfadb88b3 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -88,6 +88,8 @@ Other Changes: - Tables: Fixed incorrect border height used for logic when resizing one of several synchronized instance of a same table ID, when instances have a different height. (#3955). - Tables: Fixed incorrect auto-fit of parent windows when using non-resizable weighted columns. (#5276) +- Tables: Fixed drawcall merging of last column. Depending on some unrelated settings (e.g. BorderH) + merging drawcall of the last column didn't always work (regression since 1.87). (#4843, #4844) [@rokups] - Inputs: Fixed IsMouseClicked() repeat mode rate being half of keyboard repeat rate. - ColorEdit: Fixed text baseline alignment after a SameLine() after a ColorEdit() with visible label. - Menus: Adjusted BeginMenu() closing logic so hovering void or non-MenuItem() in parent window diff --git a/imgui.h b/imgui.h index d0d939096..488b5d1fd 100644 --- a/imgui.h +++ b/imgui.h @@ -65,7 +65,7 @@ Index of this file: // Version // (Integer encoded as XYYZZ for use in #if preprocessor conditionals. Work in progress versions typically starts at XYY99 then bounce up to XYY00, XYY01 etc. when release tagging happens) #define IMGUI_VERSION "1.88 WIP" -#define IMGUI_VERSION_NUM 18724 +#define IMGUI_VERSION_NUM 18725 #define IMGUI_CHECKVERSION() ImGui::DebugCheckVersionAndDataLayout(IMGUI_VERSION, sizeof(ImGuiIO), sizeof(ImGuiStyle), sizeof(ImVec2), sizeof(ImVec4), sizeof(ImDrawVert), sizeof(ImDrawIdx)) #define IMGUI_HAS_TABLE diff --git a/imgui_tables.cpp b/imgui_tables.cpp index bf04f44b5..6757999cb 100644 --- a/imgui_tables.cpp +++ b/imgui_tables.cpp @@ -2370,7 +2370,7 @@ void ImGui::TableMergeDrawChannels(ImGuiTable* table) // Don't attempt to merge if there are multiple draw calls within the column ImDrawChannel* src_channel = &splitter->_Channels[channel_no]; - if (src_channel->_CmdBuffer.Size > 0 && src_channel->_CmdBuffer.back().ElemCount == 0 && src_channel->_CmdBuffer.back().UserCallback != NULL) // Equivalent of PopUnusedDrawCmd() + if (src_channel->_CmdBuffer.Size > 0 && src_channel->_CmdBuffer.back().ElemCount == 0 && src_channel->_CmdBuffer.back().UserCallback == NULL) // Equivalent of PopUnusedDrawCmd() src_channel->_CmdBuffer.pop_back(); if (src_channel->_CmdBuffer.Size != 1) continue;