-
-
Notifications
You must be signed in to change notification settings - Fork 19.4k
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
Tree drag&drop line does not render correctly if an item has children #52053
Comments
So I fixed the drawing (commit on my fork) but it doesn't solve the real issue about the current
As you can see the problem which remains before/after the fix is that the user can't obtain the drop destination according to what's being drawn as a drop destination. So currently the user would need to duplicate the same logic in his drag-drop code to match what's being highlighted by the A possible solution might be adding a method like
|
Yes, what you're saying makes sense, I get your point. However, just checked how This will of course not solve the issue I've mentioned in my previous comment: in drag-drop code user needs to perform the same logic which is applied when drawing to make things match. This needs to be somehow solved, I'd say this needs a separate proposal/discussion for finding a good solution. About your point: when I was writing a fix linked above, I didn't even think about doing it like you're suggesting, the way it behaves currenly in the editor's Scene dock / the way it's drawn in my fix seemed obvious. So my doubt about your suggestion is: will it be intuitive? On the other hand if the indicators will be drawn correctly then the feedback for the user should make it obvious how things work. Not sure about it.
|
Thank you for the suggestion about the proposal, I filed one with my thoughts on how this should work. Hopefully this will at least start some sort of discussion for this so a solution can be found (even if it is not the one I suggested). |
Godot version
3.3.2 stable mono win64
System information
Windows 10
Issue description
If you have a tree with items that have children and enable drag & drop with mode (DROP_MODE_INBETWEEN) then the drop hint line does not render correctly (see screenshot).
As you can see the line renders correctly below the item that has no children (left side), however for the item with children it never renders below the item (right side).
That being said the position you get from "get_drop_section_at_position(position)" is correct and tells you that the item was dropped below the item even though the line is not rendered as such.
Steps to reproduce
Enable drag & drop in a tree that has items with children and try to drag something below an item with a child. I included a simple project that shows the issue.
Minimal reproduction project
Dragndroptree.zip
The text was updated successfully, but these errors were encountered: