1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-11-28 17:40:56 +01:00

NextColumn() tidying up with a sane early out

This commit is contained in:
ocornut 2016-06-29 09:53:02 +02:00
parent ba7acdac47
commit 297bb3fc92

View File

@ -9178,12 +9178,10 @@ void ImGui::NewLine()
void ImGui::NextColumn()
{
ImGuiWindow* window = GetCurrentWindow();
if (window->SkipItems)
if (window->SkipItems || window->DC.ColumnsCount <= 1)
return;
ImGuiContext& g = *GImGui;
if (window->DC.ColumnsCount > 1)
{
PopItemWidth();
PopClipRect();
@ -9209,7 +9207,6 @@ void ImGui::NextColumn()
PushColumnClipRect();
PushItemWidth(GetColumnWidth() * 0.65f); // FIXME: Move on columns setup
}
}
int ImGui::GetColumnIndex()
{