-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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 "View Owners" dialog not acknowledging that some resources aren't scenes #68697
Fix "View Owners" dialog not acknowledging that some resources aren't scenes #68697
Conversation
a1aafad
to
951311b
Compare
60dc4bb
to
cb86eea
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.
Seems fine by me!
cb86eea
to
dca9167
Compare
Pretty safe bugfix IMO, but could wait for after 4.0 |
if (only_scenes_selected) { | ||
file_options->add_icon_item(get_theme_icon(SNAME("Load"), SNAME("EditorIcons")), TTRN("Open Scene", "Open Scenes", selected_items.size()), FILE_OPEN); | ||
} else if (selected_items.size() == 1) { | ||
file_options->add_icon_item(get_theme_icon(SNAME("Load"), SNAME("EditorIcons")), TTR("Open"), FILE_OPEN); |
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.
Both the old and the new code is rather misleading, as both options are identical. Only the text is different. I think we could simplify this. And we could also rework the awkward return below in the process with an early return.
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.
Not sure I follow... You can open multiple scenes at once, unlike other resources, so they are separated.
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.
Both these options trigger FILE_OPEN
with no additional information passed from this bit, only the text on the option is different (even the icon is the same).
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.
Well, in fact, this is quite a lot of checking just to display a slightly different text. Perhaps we should just call the option "Open Selected"? What's the significance of writing "Open Scenes"?
Edit: I guess we still want to know if only scenes are selected, otherwise the action should be simply disabled. Eh, let's leave it as is.
Regardless of the suggestion above, it's probably worth rebasing this because it's been a few months at this point. |
dca9167
to
d7eefc3
Compare
Thanks! |
Silly dialog!
This behavior matches the FileSystem dock. The whole dialog could use a glow up, but this fixes its bugs for now.