Skip to content

Commit

Permalink
Drag and Drop: Source can also inhibit the preview on target, useful …
Browse files Browse the repository at this point in the history
…for extern sources that only exists for one frame. (ocornut#143)
  • Loading branch information
ocornut committed Dec 15, 2017
1 parent 51433e2 commit 6effcf2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 6effcf2

Please sign in to comment.