1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-11-24 15:50:25 +01:00

Columns: avoid growing ColumnsData vector when closing a window with no columns (#125)

(Will break calling GetColumnOffset() when there's no column but it
would only have worked after the first frame anyway, so basically it
didn't work)
This commit is contained in:
ocornut 2015-11-26 23:07:10 +00:00
parent 1aac69c937
commit 58b23b4785

View File

@ -8910,9 +8910,7 @@ void ImGui::Columns(int columns_count, const char* id, bool border)
}
else
{
window->DC.ColumnsData.resize(2);
window->DC.ColumnsData[0].OffsetNorm = 0.0f;
window->DC.ColumnsData[1].OffsetNorm = 1.0f;
window->DC.ColumnsData.resize(0);
}
}