-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
What am I doing wrong when trying to set up DnD with tree nodes? #6387
Comments
Code looks good to me, I can't spot any mistakes. Looks pretty similar to the drag&drop handling in an outliner window I made (also using the docking branch). Since you mentioned custom backends, can you reproduce the issue with default backends as well? Just to make sure that the culprit isn't hiding in there. Another idea: are your node names guaranteed unique? If not, repeating names could mess up the id stack and that might interfere with proper handling as well. In that case, surrounding your One general hint I can give is to not repeat the payload string, use something like |
@GamingMinds-DanielC Thank you for the help! The issue was in IDs. I had some entities that had the same name. Adding PushID/PopID fixed my problem! |
Also #74, #96, #480, #501, #647, #654, #719, #843, #894, #1057, #1173, #1390, #1414, #1556, #1768, #2041, #2116, #2330, #2475, #2562, #2667, #2807, #2885, #3102, #3375, #3526, #3964, #4008, #4070, #4158, #4172, #4199, #4375, #4395, #4471, #4548, #4612, #4631, #4657, #4796, #5210, #5303, #5360, #5393, #5533, #5692, #5707, #5729, #5773, #5787, #5884, #6046, #6093, #6186, #6223, #6364, #6387, #6567, #6692, #6724, #6939, #6984, #7246, #7270, #7375, #7421, #7434, #7472, #7581, #7724, #7926, #7937 and probably more.. Tagging to increase visibility!
Version/Branch of Dear ImGui:
Version: The version in docking that's in commit 4fdafe
Branch: docking
Back-end/Renderer/Compiler/OS
Back-ends: Custom backend
Compiler: MSVC
Operating System: Windows
My Issue/Question:
I am not sure what I am doing wrong here. I have a scene hierarchy window that recursively renders tree nodes. I want to add DnD to it so that I can reparent nodes anywhere. However, the drop target do not seem to be working. Drop target logic does not get triggered (even breakpoints do not trigger it). For the sake of testing, I have removed all the other operations (click, right click, and rendering children) and kept it as simple as possible:
The text was updated successfully, but these errors were encountered: