Columns: ImDrawList::Channels* functions now work inside columns.

Use a private splitter in columns, paving way for removal of obsolete ImDrawList::Channels* functions.
This commit is contained in:
Rokas Kupstys
2020-01-29 16:14:58 +02:00
committed by omar
parent 05a49f0413
commit 9cff4d6e5e
5 changed files with 16 additions and 10 deletions

View File

@ -1307,7 +1307,7 @@ void ImDrawListSplitter::ClearFreeMemory()
void ImDrawListSplitter::Split(ImDrawList* draw_list, int channels_count)
{
IM_ASSERT(_Current == 0 && _Count <= 1);
IM_ASSERT(_Current == 0 && _Count <= 1 && "Nested channel splitting is not supported. Please use separate instances of ImDrawListSplitter.");
int old_channels_count = _Channels.Size;
if (old_channels_count < channels_count)
_Channels.resize(channels_count);