From 6effcf21d62e41c5ef658fdf6839f6e955030cfc Mon Sep 17 00:00:00 2001 From: omar Date: Fri, 15 Dec 2017 11:09:18 +0100 Subject: [PATCH] Drag and Drop: Source can also inhibit the preview on target, useful for extern sources that only exists for one frame. (#143) --- imgui.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/imgui.cpp b/imgui.cpp index cff66bf57..90316a8d8 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -11422,6 +11422,7 @@ const ImGuiPayload* ImGui::AcceptDragDropPayload(const char* type, ImGuiDragDrop // Render default drop visuals payload.Preview = was_accepted_previously; + flags |= (g.DragDropSourceFlags & ImGuiDragDropFlags_AcceptNoDrawDefaultRect); // Source can also inhibit the preview (useful for external sources that lives for 1 frame) if (!(flags & ImGuiDragDropFlags_AcceptNoDrawDefaultRect) && payload.Preview) { // FIXME-DRAG: Settle on a proper default visuals for drop target.