mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-26 02:34:23 +00:00
Drag and Drop: Fix drag and drop to tie same-size drop targets by choosen the later one. Fixes dragging into a full-window-sized dockspace inside a zero-padded window. (#3519, #2717)
This commit is contained in:
parent
d015004f45
commit
c9fafd5ea4
2 changed files with 3 additions and 1 deletions
|
|
@ -9584,7 +9584,7 @@ const ImGuiPayload* ImGui::AcceptDragDropPayload(const char* type, ImGuiDragDrop
|
|||
const bool was_accepted_previously = (g.DragDropAcceptIdPrev == g.DragDropTargetId);
|
||||
ImRect r = g.DragDropTargetRect;
|
||||
float r_surface = r.GetWidth() * r.GetHeight();
|
||||
if (r_surface < g.DragDropAcceptIdCurrRectSurface)
|
||||
if (r_surface <= g.DragDropAcceptIdCurrRectSurface)
|
||||
{
|
||||
g.DragDropAcceptFlags = flags;
|
||||
g.DragDropAcceptIdCurr = g.DragDropTargetId;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue