-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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 dragging in mesh preview will create a "drag and drop" action #83425
Fix dragging in mesh preview will create a "drag and drop" action #83425
Conversation
Change MeshEditor's parent from SubViewportContainer to Control
Why does changing the parent class specifically fix this issue? The only functional difference I see is the added call to It makes sense IMO to unify similar editors but I think in the past we've actually gone the other direction of trying to remove unnecessary intermediate nodes (CC @YeldhamDev). |
First, thank you for your suggestions!
I tested locally and find that To be honest I do not know how the drag and drop works but I suspect it may have something to do with subviewportcontainer's event propagation. And the material editor works well when inheriting Also, unify similar editors is one concern, another one is that it reduces the inheritance chain which could be beneficial. |
CC @Sauermann who might know why drag and drop behaves differently on Control and SubViewportContainer. |
For me this part of the editor is difficult to digest. godot/editor/editor_inspector.cpp Lines 802 to 817 in fd33c7b
I have the feeling, that it is intentional, that dragging a Perhaps the Without knowing this part of the code-base, I have the feeling, that replacing the Node inheritance (SubViewportContainer -> Control) just hides the underlying problem. But please note that this is just a guess. I have also tested, that #67531 (rebased on fd33c7b) also shows the same drag and drop behavior. |
Looks like the issue is no longer reproducible. |
Ok confirmed fixed by some another PR. |
MaterialEditor doesn't have this problem. Did some check and found they have different parent class that caused the behaviour difference. So I change MeshEditor's parent from SubViewportContainer to Control. Tested locally, it worked.
I would appreciate any feedback or alternative suggestions.
Fixes #83171