From 8f75cffc09579d1f574b710af7d78c13ffe29f10 Mon Sep 17 00:00:00 2001 From: ocornut Date: Sat, 21 Feb 2015 10:27:13 +0000 Subject: [PATCH] Columns: doesn't incorrectly bail out when SkipItems is set (fix #136) --- imgui.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index 11f34fd5..aba0a292 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -1124,7 +1124,7 @@ public: ImU32 Color(const ImVec4& col) const { ImVec4 c = col; c.w *= GImGui->Style.Alpha; return ImGui::ColorConvertFloat4ToU32(c); } }; -static ImGuiWindow* GetCurrentWindow() +static inline ImGuiWindow* GetCurrentWindow() { ImGuiState& g = *GImGui; IM_ASSERT(g.CurrentWindow != NULL); // ImGui::NewFrame() hasn't been called yet? @@ -6347,8 +6347,6 @@ void ImGui::Columns(int columns_count, const char* id, bool border) { ImGuiState& g = *GImGui; ImGuiWindow* window = GetCurrentWindow(); - if (window->SkipItems) - return; if (window->DC.ColumnsCount != 1) { @@ -6362,7 +6360,7 @@ void ImGui::Columns(int columns_count, const char* id, bool border) } // Draw columns borders and handle resize at the time of "closing" a columns set - if (window->DC.ColumnsCount != columns_count && window->DC.ColumnsCount != 1 && window->DC.ColumnsShowBorders) + if (window->DC.ColumnsCount != columns_count && window->DC.ColumnsCount != 1 && window->DC.ColumnsShowBorders && !window->SkipItems) { const float y1 = window->DC.ColumnsStartPos.y; const float y2 = window->DC.CursorPos.y;