mirror of
https://github.com/ocornut/imgui.git
synced 2026-02-06 04:20:08 +00:00
Layout: fixed End()/EndChild() incorrectly asserting if users manipulates cursor position inside a collapsed/culled window and IMGUI_DISABLE_OBSOLETE_FUNCTIONS is enabled. (#5548, #5911)
This commit is contained in:
parent
3a685749cb
commit
c3d9f8ee7e
2 changed files with 4 additions and 0 deletions
|
|
@ -8694,6 +8694,8 @@ void ImGui::ErrorCheckUsingSetCursorPosToExtendParentBoundaries()
|
|||
#ifdef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
if (window->DC.CursorPos.x <= window->DC.CursorMaxPos.x && window->DC.CursorPos.y <= window->DC.CursorMaxPos.y)
|
||||
return;
|
||||
if (window->SkipItems)
|
||||
return;
|
||||
IM_ASSERT(0 && "Code uses SetCursorPos()/SetCursorScreenPos() to extend window/parent boundaries. Please submit an item e.g. Dummy() to validate extent.");
|
||||
#else
|
||||
window->DC.CursorMaxPos = ImMax(window->DC.CursorMaxPos, window->DC.CursorPos);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue