From 098591fe4c95dd4939d0c6e30d18f6b1ff49e49d Mon Sep 17 00:00:00 2001 From: omar Date: Tue, 17 Sep 2019 20:27:15 +0200 Subject: [PATCH] ImDrawListSplitter: fixed an issue merging channels if the last submitted draw command used a different texture. (#2506) --- docs/CHANGELOG.txt | 1 + imgui_draw.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 0c3a28d6..dcb8fab1 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -56,6 +56,7 @@ Other Changes: Otherwise we render ellipsis using '.' from the font from where we trim excessive spacing to make it as narrow as possible. (#2775) [@rokups] - ImDrawList: clarified the name of many parameters so reading the code is a little easier. (#2740) +- ImDrawListSplitter: fixed an issue merging channels if the last submitted draw command used a different texture. (#2506) - Using offsetof() when available in C++11. Avoids Clang sanitizer complaining about old-style macros. (#94) - Added a mechanism to compact/free the larger allocations of unused windows (buffers are compacted when a window is unused for 60 seconds, as per io.ConfigWindowsMemoryCompactTimer = 60.0f). Note that memory diff --git a/imgui_draw.cpp b/imgui_draw.cpp index e1a023d7..eb173b44 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -1301,6 +1301,7 @@ void ImDrawListSplitter::Merge(ImDrawList* draw_list) } draw_list->_IdxWritePtr = idx_write; draw_list->UpdateClipRect(); // We call this instead of AddDrawCmd(), so that empty channels won't produce an extra draw call. + draw_list->UpdateTextureID(); _Count = 1; }