Allow ROI context menu to show if non-removable#2932
Merged
j9ac9k merged 1 commit intopyqtgraph:masterfrom Feb 17, 2024
Merged
Conversation
Previously the context menu would one show if self.removable was true, even if the user had added a menu item. Now show the menu if either the ROI is removeable, or there has been an item added.
Member
|
Thanks for the PR @samtygier this LGTM 👍🏻 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously
getmenu()would always add a "Remove ROI" entry, but would only show the menu ifself.removablewas True. This meant that if a user adds a menu item to a non-removable ROI it is never show.Now only add a "Remove ROI" entry for a removale ROI, and show the menu if it is removable, or there has been an item added.
Fixes #2931
Does this need to handle the removable attribute being modified later? Currently the "Remove ROI" entry is added when the menu if first made, and not changed after.
Should the menu show, if not removable and no other items are added? This would change the existing behaviour of an ROI which is to suppress the menu of the parent.
Does this need to be done for other objects?
Other Tasks
Bump Dependency Versions
Files that need updates
Confirm the following files have been either updated or there has been a determination that no update is needed.
README.mdsetup.pytox.ini.github/workflows/main.ymland associatedrequirements.txtand condaenvironemt.ymlfilespyproject.tomlbinder/requirements.txtPre-Release Checklist
Pre Release Checklist
__init__.pyCHANGELOGprimarily using contents from automated changelog generation in GitHub release pagePost-Release Checklist
Steps To Complete
.dev0to__version__in__init__.py