-
-
Notifications
You must be signed in to change notification settings - Fork 21.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
Don't resolve icons from script base class. #76993
Conversation
Seems you are right with this. That makes it a little bit complicated. The passed class name in this case is
|
f880036
to
078b965
Compare
078b965
to
2b91304
Compare
Ok so there is basically the fourth case, that the object is a |
This is an incorrect way to solve the reported problem because the problem is not about icons. You've proposed the correct approach in the issue itself, we should warn with a configuration warning that the script is attached to a wrong kind of node. But there is nothing wrong with the icon resolution logic. If there is no script, then the node's type name is used. If there is script, then the most relevant icon for that script is used. The icon ends up misleading in the reported case because the case is invalid. So it's not the icon that we should worry about. |
In the beginning the issue was about icons but it shifted away from that. The confusing case which the issue reffered to, might not be important if adding a warning. However there is still a problem with the icon resolution logic. If you use a script that inherits Thinking about how the discussion on the issue moved along I should propably open a seperate issue for that. |
It is valid, but it's questionable to me which icon should be displayed in such a case. Why would the node type be more important than the script type? And if this script does have an icon, how does that change things? This icon would be also associated with a script extending the base class not the node's class, so you could also argue that showing it would be incorrect. |
Superseded by #79203. Thanks for your contribution nevertheless! |
fixes partially #76983
There are three cases:
Node
but added to aNode2D
): In this case the more specific icon should be shown. The icon has to be resolved based on the class name.There is no case I can think of, in which the icon should be resolved based on the script base type. Therfore this PR removes this code.