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)
features/sdl_renderer3_multiviewports
ocornut ago%!(EXTRA string=10 years)
parent 1aac69c937
commit 58b23b4785
  1. 4
      imgui.cpp

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

Loading…
Cancel
Save