mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Tooltips, Drag and Drop: Fixed an issue where the fallback drag and drop payload tooltip appeared during drag and drop release.
E.g. it would otherwise appear when releasing a color button payload.
This commit is contained in:
parent
004f03945f
commit
f0575411c0
2 changed files with 3 additions and 1 deletions
|
|
@ -5521,7 +5521,7 @@ void ImGui::EndFrame()
|
|||
// in the BeginDragDropSource() block of the dragged item, you can submit them from a safe single spot
|
||||
// (e.g. end of your item loop, or before EndFrame) by reading payload data.
|
||||
// In the typical case, the contents of drag tooltip should be possible to infer solely from payload data.
|
||||
if (g.DragDropActive && g.DragDropSourceFrameCount < g.FrameCount && !(g.DragDropSourceFlags & ImGuiDragDropFlags_SourceNoPreviewTooltip))
|
||||
if (g.DragDropActive && g.DragDropSourceFrameCount + 1 < g.FrameCount && !(g.DragDropSourceFlags & ImGuiDragDropFlags_SourceNoPreviewTooltip))
|
||||
{
|
||||
g.DragDropWithinSource = true;
|
||||
SetTooltip("...");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue