Browse Source

Bullet() fixed inconsistent layout behaviour when clipped.

ocornut 10 years ago
parent
commit
9eed672725
1 changed files with 3 additions and 0 deletions
  1. 3 0
      imgui.cpp

+ 3 - 0
imgui.cpp

@@ -5436,7 +5436,10 @@ void ImGui::Bullet()
     const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(line_height, line_height));
     const ImRect bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(line_height, line_height));
     ItemSize(bb);
     ItemSize(bb);
     if (!ItemAdd(bb, NULL))
     if (!ItemAdd(bb, NULL))
+    {
+        ImGui::SameLine(0, -1);
         return;
         return;
+    }
 
 
     // Render
     // Render
     const float bullet_size = line_height*0.15f;
     const float bullet_size = line_height*0.15f;