mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Tabs: attempt to fix infinite loop in tab-bar ShrinkWidth() by using an epsilon. (#5652, #3421, #8800)
This commit is contained in:
parent
c22af8c346
commit
412daf7362
1 changed files with 1 additions and 1 deletions
|
|
@ -1840,7 +1840,7 @@ void ImGui::ShrinkWidths(ImGuiShrinkWidthItem* items, int count, float width_exc
|
||||||
}
|
}
|
||||||
ImQsort(items, (size_t)count, sizeof(ImGuiShrinkWidthItem), ShrinkWidthItemComparer); // Sort largest first, smallest last.
|
ImQsort(items, (size_t)count, sizeof(ImGuiShrinkWidthItem), ShrinkWidthItemComparer); // Sort largest first, smallest last.
|
||||||
int count_same_width = 1;
|
int count_same_width = 1;
|
||||||
while (width_excess > 0.0f && count_same_width < count)
|
while (width_excess > 0.001f && count_same_width < count)
|
||||||
{
|
{
|
||||||
while (count_same_width < count && items[0].Width <= items[count_same_width].Width)
|
while (count_same_width < count && items[0].Width <= items[count_same_width].Width)
|
||||||
count_same_width++;
|
count_same_width++;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue