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

Refactor disabling scene tab context menu options #81072

Merged

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Aug 28, 2023

Follow-up to #79382
I was going to disable one more option, but then noticed another option should also be disabled and eventually I refactored the whole thing 🤷‍♂️

  • disable Show In FileSystem when the scene file does not exist (either empty scene or file was deleted)
  • disable Save Scene, Save Scene As... and Play This Scene if root node does not exist
  • disable Save All Scenes if there are no scenes that can be saved
  • add a helper method to conditionally disable an option, to make code cleaner

image

@YuriSizov YuriSizov modified the milestones: 4.x, 4.2 Sep 1, 2023
@KoBeWi KoBeWi force-pushed the the_scene_file_is_in_another_castle branch from f457c43 to 1a16010 Compare September 1, 2023 17:22
@KoBeWi KoBeWi force-pushed the the_scene_file_is_in_another_castle branch from 1a16010 to a949f1b Compare September 1, 2023 19:35
@akien-mga akien-mga merged commit bb61a93 into godotengine:master Sep 2, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@KoBeWi KoBeWi deleted the the_scene_file_is_in_another_castle branch September 2, 2023 12:38
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.

3 participants