Clipper: Fixed an issue where passing an out of bound index to IncludeItemByIndex() could incorrectly offset the final cursor.
One case where it would manifest was calling Combo() with an out of range index. (#8450)
This commit is contained in:
@@ -103,6 +103,9 @@ Other changes:
|
|||||||
(#8451, #7660) [@achabense]
|
(#8451, #7660) [@achabense]
|
||||||
- TextLinkOpenURL(): fixed default Win32 io.PlatformOpenInShellFn handler to
|
- TextLinkOpenURL(): fixed default Win32 io.PlatformOpenInShellFn handler to
|
||||||
handle UTF-8 regardless of system regional settings. (#7660) [@achabense]
|
handle UTF-8 regardless of system regional settings. (#7660) [@achabense]
|
||||||
|
- Clipper: Fixed an issue where passing an out of bound index to IncludeItemByIndex()
|
||||||
|
could incorrectly offset the final cursor, even if that index was not iterated through.
|
||||||
|
One case where it would manifest was calling Combo() with an out of range index. (#8450)
|
||||||
- Debug Tools: Added io.ConfigDebugHighlightIdConflictsShowItemPicker (defaults to true)
|
- Debug Tools: Added io.ConfigDebugHighlightIdConflictsShowItemPicker (defaults to true)
|
||||||
to allow disabled Item Picker suggestion in user facing builds. (#7961, #7669)
|
to allow disabled Item Picker suggestion in user facing builds. (#7961, #7669)
|
||||||
- Misc: Added ImGuiMouseCursor_Wait and ImGuiMouseCursor_Progress mouse cursors
|
- Misc: Added ImGuiMouseCursor_Wait and ImGuiMouseCursor_Progress mouse cursors
|
||||||
|
|||||||
@@ -3258,11 +3258,11 @@ static bool ImGuiListClipper_StepInternal(ImGuiListClipper* clipper)
|
|||||||
{
|
{
|
||||||
clipper->DisplayStart = ImMax(data->Ranges[data->StepNo].Min, already_submitted);
|
clipper->DisplayStart = ImMax(data->Ranges[data->StepNo].Min, already_submitted);
|
||||||
clipper->DisplayEnd = ImMin(data->Ranges[data->StepNo].Max, clipper->ItemsCount);
|
clipper->DisplayEnd = ImMin(data->Ranges[data->StepNo].Max, clipper->ItemsCount);
|
||||||
if (clipper->DisplayStart > already_submitted) //-V1051
|
|
||||||
clipper->SeekCursorForItem(clipper->DisplayStart);
|
|
||||||
data->StepNo++;
|
data->StepNo++;
|
||||||
if (clipper->DisplayStart == clipper->DisplayEnd && data->StepNo < data->Ranges.Size)
|
if (clipper->DisplayStart >= clipper->DisplayEnd)
|
||||||
continue;
|
continue;
|
||||||
|
if (clipper->DisplayStart > already_submitted)
|
||||||
|
clipper->SeekCursorForItem(clipper->DisplayStart);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3279,7 +3279,7 @@ bool ImGuiListClipper::Step()
|
|||||||
ImGuiContext& g = *Ctx;
|
ImGuiContext& g = *Ctx;
|
||||||
bool need_items_height = (ItemsHeight <= 0.0f);
|
bool need_items_height = (ItemsHeight <= 0.0f);
|
||||||
bool ret = ImGuiListClipper_StepInternal(this);
|
bool ret = ImGuiListClipper_StepInternal(this);
|
||||||
if (ret && (DisplayStart == DisplayEnd))
|
if (ret && (DisplayStart >= DisplayEnd))
|
||||||
ret = false;
|
ret = false;
|
||||||
if (g.CurrentTable && g.CurrentTable->IsUnfrozenRows == false)
|
if (g.CurrentTable && g.CurrentTable->IsUnfrozenRows == false)
|
||||||
IMGUI_DEBUG_LOG_CLIPPER("Clipper: Step(): inside frozen table row.\n");
|
IMGUI_DEBUG_LOG_CLIPPER("Clipper: Step(): inside frozen table row.\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user