Browse Source

BeginListBox(): fixed not consuming SetNextWindowXXX data when returning false.

ocornut 1 year ago
parent
commit
cf1c4a0cb1
2 changed files with 4 additions and 1 deletions
  1. 2 0
      docs/CHANGELOG.txt
  2. 2 1
      imgui_widgets.cpp

+ 2 - 0
docs/CHANGELOG.txt

@@ -44,6 +44,8 @@ Breaking changes:
 
 
 Other changes:
 Other changes:
 
 
+- BeginListBox(): fixed not consuming SetNextWindowXXX data when returning false.
+
 
 
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
  VERSION 1.89.9 (Released 2023-09-04)
  VERSION 1.89.9 (Released 2023-09-04)

+ 2 - 1
imgui_widgets.cpp

@@ -1,4 +1,4 @@
-// dear imgui, v1.89.9
+// dear imgui, v1.90 WIP
 // (widgets code)
 // (widgets code)
 
 
 /*
 /*
@@ -6630,6 +6630,7 @@ bool ImGui::BeginListBox(const char* label, const ImVec2& size_arg)
     {
     {
         ItemSize(bb.GetSize(), style.FramePadding.y);
         ItemSize(bb.GetSize(), style.FramePadding.y);
         ItemAdd(bb, 0, &frame_bb);
         ItemAdd(bb, 0, &frame_bb);
+        g.NextWindowData.ClearFlags(); // We behave like Begin() and need to consume those values
         return false;
         return false;
     }
     }