-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Disable irrelevant scene tab context menu items #79382
Disable irrelevant scene tab context menu items #79382
Conversation
Oh, so this makes an existing bug surface where the popup doesn't realize in time that by doing RMB, you changed the active scene. I have a mild memory of noticing this bug already being present for Undo Close Tab somehow. Either way, I should probably look into fixing this before the PR is acceptable |
I think you should use the clicked tab id instead of the current scene. |
9d4a13a
to
4b0ee49
Compare
True, doned and works |
Thanks! |
if (editor_data.get_edited_scene_count() <= 1) { | ||
scene_tabs_context_menu->set_item_disabled(file_menu->get_item_index(FILE_CLOSE_OTHERS), true); | ||
} | ||
scene_tabs_context_menu->add_item(TTR("Close Tabs to the Right"), FILE_CLOSE_RIGHT); | ||
if (editor_data.get_edited_scene_count() == tab_id + 1) { | ||
scene_tabs_context_menu->set_item_disabled(file_menu->get_item_index(FILE_CLOSE_RIGHT), true); | ||
} |
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.
There is a typo here, right? It shouldn't be file_menu
, it should be scene_tabs_context_menu
.
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.
I fixed it in #80490.
Like it's done in the script list.