Drag and Drop: Fix losing drop source ActiveID (and often source tooltip) when opening a TreeNode() or CollapsingHeader() while dragging. (#1738)

Amend 7b3d379, 8241cd62 etc.
This commit is contained in:
ocornut
2020-10-26 14:40:44 +01:00
parent b7530e5d04
commit df35157397
2 changed files with 4 additions and 0 deletions

View File

@ -9425,6 +9425,8 @@ bool ImGui::BeginDragDropSource(ImGuiDragDropFlags flags)
g.DragDropActive = true;
g.DragDropSourceFlags = flags;
g.DragDropMouseButton = mouse_button;
if (payload.SourceId == g.ActiveId)
g.ActiveIdNoClearOnFocusLoss = true;
}
g.DragDropSourceFrameCount = g.FrameCount;
g.DragDropWithinSource = true;