Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overlapping nodes aren't compatible with ImGui::BeginDragDropTarget() #179

Open
Pycorax opened this issue Mar 9, 2023 · 1 comment
Open

Comments

@Pycorax
Copy link

Pycorax commented Mar 9, 2023

Description

Given an ImNodes node which contains a drag and drop target that is implemented using ImGui::BeginDragDropTarget() and ImGui::EndDragDropTarget(), if two of these nodes overlap such that the drag and drop targets overlap, attempting to drag and drop anything on to it will result in an assertion failure in ImGui::BeginDragDropTarget(): IM_ASSERT(g.DragDropWithinTarget == false); which results in a crash.

This works perfectly fine if there is no overlap. I'm not too sure how fix-able this issue is from ImNodes since it seems to be a limitation with ImGui's implementation of drag and drop targets but I figured it's important to note it here.

Demo

SHADE_Application_8u4aC0unkZ.mp4
@skaarj1989
Copy link

Works fine for me.

ImGui::BeginDragDropSource(ImGuiDragDropFlags_SourceAllowNullID)
2023-03-14.13-45-07.webm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants