diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 0060217bc..cac9990d0 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -41,6 +41,9 @@ Breaking Changes: If you were still using the old names, read "API Breaking Changes" section of imgui.cpp to find out the new names and equivalent. +Other Changes: +- ImDrawList::ChannelsSplit(), ImDrawListSlitter: Fixed an issue with merging draw commands between channel 0 and 1. (#2624) + ----------------------------------------------------------------------- VERSION 1.71 (Released 2019-06-12) diff --git a/imgui_draw.cpp b/imgui_draw.cpp index 9f49abafa..53fd4171b 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -1262,7 +1262,7 @@ void ImDrawListSplitter::Merge(ImDrawList* draw_list) // Calculate our final buffer sizes. Also fix the incorrect IdxOffset values in each command. int new_cmd_buffer_count = 0; int new_idx_buffer_count = 0; - ImDrawCmd* last_cmd = (_Count > 0 && _Channels[0]._CmdBuffer.Size > 0) ? &_Channels[0]._CmdBuffer.back() : NULL; + ImDrawCmd* last_cmd = (_Count > 0 && draw_list->CmdBuffer.Size > 0) ? &draw_list->CmdBuffer.back() : NULL; int idx_offset = last_cmd ? last_cmd->IdxOffset + last_cmd->ElemCount : 0; for (int i = 1; i < _Count; i++) {