-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Fix FileSystemDock behavior when dropping an item in the current folder #90062
Fix FileSystemDock behavior when dropping an item in the current folder #90062
Conversation
I tested this pr and it seems to work as expected.
I'd say that this is wanted, see #63279 |
Fair point, I'll wait to see what reviews I get on this and I'll add the change to the PR if people agree that it should be. Just wondering if there are weird edge cases I'm not aware of that would warrant not having it. Edit: Yeah, I'm pretty sure all it takes is removing the |
54b11c9
to
3258dc7
Compare
I changed a condition for the tree highlighting logic for resources and nodes to work the same way, which fixes #63279. I've explored some other improvements:
They work, but they feel like QoL improvements over bug fixes, so I'm purposefully excluding them from this PR. Edit: Another update!
I think |
3258dc7
to
554b24a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine, aside from the duplicated code I commented.
554b24a
to
0ccc34d
Compare
Updated this one last time. The drop mode flag is being set right before calling Thank you for looking at my PR and please let me know if this is satisfactory! |
edit: I tested it again and it works. Additionally, I found an edge case visual inconsistency: Video clip of the inconsistencysimplescreenrecorder-2024-04-05_07.39.40.mp4as shown in this clip, the target ( |
Hi, I fixed it for resources, but not for files and folders because of the extra changes required to properly deal with the Favorites. Also, I think it'd be cool to implement drag and dropping directly at the right location when adding a file or folder to the favorites, so the current highlighting style would make sense. I guess I forgot #63279 mentioned files (my PR does cover the video example there), so I'll remove it from the OP for now.
Yeah, I'm aware of that one, but it's a little tricky, because I can make it select Anyway, this PR is mostly about fixing the weird targeting issues and the wrong save path choice from #90046. I do see a lot of room for improving |
actually, this was about the resources part, but I fetched the wrong commit and modified my post shortly after to remove the part you quote, I didn't even think of dragging files 😅 I was too focused on the present issue. But as you say, it doesn't fully close my original report. |
Thanks! |
Fixes #90046.
Fully gets rid of the issue showcased in the above thread. Dragging a
Node
branch over the empty region of a splitFileSystemDock
now results in proper directory highlighting, in both list view and thumbnail view. Dropping the item results in the proper directory being selected in the "Save New Scene As..." window as well.Functionally, this is also fully fixed for
Resources
, except for the highlighting that was absent from the start.Enabling highlighting in the file tree is actually quite trivial, as it's only being prevented by this single condition:
if (mm.is_valid() && holding_branch)
on line 3457, whereholding_branch
is only true whenNode
branches are being dragged.If we want highlighting for those items, we could simply introduce a new boolean and check for either of them to be true. I have no idea if this is by design, so I haven't touched it yet.
Thanks for your interest and I'm looking forward to everyone's feedback.