mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 20:18:47 +02: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:
@ -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;
|
||||
|
Reference in New Issue
Block a user