Closed tom-seddon closed 6 years ago
Merged. Thanks for your feedback :+1:
Note that these fixes are cherry-picked from my imguidock branch, which includes some other stuff that my program depends on, so I haven't tested them in isolation :( - however imgui.cpp does build. Sorry about this.
No problem. If we find some issue, we can always roll back. But it seems you're used and tested imguidock much more than I have, so your reports are very useful. Thank you again :smile:
I found a couple of bugs in the docking code. My UI is somewhat dynamic, so I was fiddling around constantly opening and closing new windows and docking them in random places each time... this stuff would occasionally cause crashes, infinite loops in the tab linked list, and overlapping tab buttons and windows.
Firstly, it was possible to dock a window to a container, if the root window was a container,
m_next_parent
wasNULL
, and the docking was due to this bit of code inbegin
:So
doDock
now finds a non-container to dock to whenm_next_parent
isNULL
.Secondly,
m_next_parent
wasn't being fixed up if the next parent happened to be the window being undocked.Note that these fixes are cherry-picked from my imguidock branch, which includes some other stuff that my program depends on, so I haven't tested them in isolation :( - however imgui.cpp does build. Sorry about this.
Thanks,
--Tom