From 9eed6727257f0f84810326ae4d93bae79b3e07bc Mon Sep 17 00:00:00 2001 From: ocornut Date: Sun, 30 Aug 2015 15:42:42 +0100 Subject: [PATCH] Bullet() fixed inconsistent layout behaviour when clipped. --- imgui.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/imgui.cpp b/imgui.cpp index aad15c1f..76d80ef5 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -5436,7 +5436,10 @@ void ImGui::Bullet() const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(line_height, line_height)); ItemSize(bb); if (!ItemAdd(bb, NULL)) + { + ImGui::SameLine(0, -1); return; + } // Render const float bullet_size = line_height*0.15f;