1
0
Fork 0

Fix drag drop logic

master
Liza 2023-09-28 10:05:54 +02:00
parent 7c9f7e01bc
commit b4606c34d3
Signed by: liza
GPG Key ID: 7199F8D727D55F67
1 changed files with 9 additions and 6 deletions

View File

@ -94,15 +94,18 @@ internal sealed class ConfigWindow : Window
ImGui.EndDragDropSource();
}
if (ImGui.BeginDragDropTarget() &&
_dragDropSource > 0 &&
ImGui.AcceptDragDropPayload("DeliverooDragDrop").NativePtr != null)
if (ImGui.BeginDragDropTarget())
{
itemToAdd = _dragDropSource;
indexToAdd = i;
if (_dragDropSource > 0 &&
ImGui.AcceptDragDropPayload("DeliverooDragDrop").NativePtr != null)
{
itemToAdd = _dragDropSource;
indexToAdd = i;
_dragDropSource = 0;
}
ImGui.EndDragDropTarget();
_dragDropSource = 0;
}
ImGui.OpenPopupOnItemClick($"###ctx{i}", ImGuiPopupFlags.MouseButtonRight);