Skip to content
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 "Class name cannot be empty" error when sorting no import files sort by type #86064

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

jsjtxietian
Copy link
Contributor

Fixes #85698

@jsjtxietian jsjtxietian requested a review from a team as a code owner December 12, 2023 10:01
@AThousandShips AThousandShips added bug topic:editor cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release labels Dec 12, 2023
@AThousandShips AThousandShips added this to the 4.3 milestone Dec 12, 2023
Copy link
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix looks alright.

Unrelated, but I wonder why the comparator uses icon path. Especially when it has the type available (and multiple types can share an icon if they don't use custom one).

@YuriSizov
Copy link
Contributor

YuriSizov commented Dec 14, 2023

Unrelated, but I wonder why the comparator uses icon path. Especially when it has the type available (and multiple types can share an icon if they don't use custom one).

Apparently, this groups similar resources together: #43018

But it indeed looks pointless. I would remove all this icon lookup and just use type names which we already use for icon lookups. I don't quite see when the type and the icon path would be meaningfully different. An icon can come from a module instead of being a part of the editor theme, which maybe would yield a different base path, but then it shouldn't matter for sorting.

@akien-mga
Copy link
Member

@jsjtxietian Are you able to update this PR following the above feedback? It sounds like the icon sorting could be removed.

@jsjtxietian
Copy link
Contributor Author

Yes absolutely.

@YuriSizov YuriSizov merged commit d92d8a4 into godotengine:master Jan 17, 2024
15 checks passed
@YuriSizov
Copy link
Contributor

Thanks!

@jsjtxietian jsjtxietian deleted the fix-sort-by-type branch January 19, 2024 03:24
@YuriSizov YuriSizov removed the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Jan 25, 2024
@YuriSizov
Copy link
Contributor

Cherry-picked for 4.2.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Editor spams "Class name cannot be empty." error when sorting by type.
5 participants