-
Notifications
You must be signed in to change notification settings - Fork 74
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
silx.gui.plot.ImageView: Fixed profile window, added setProfileWindowBehavior
method
#3457
Conversation
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.
- API looks good.
- I cannot judge what additional things need to be done when swapping toolbars.
- Implementation: perhaps make it clear that "popup" is the default by changing
class ImageView(PlotWindow):
def __init__(self, parent=None, backend=None):
self.__profile = ProfileToolBar(plot=self)
self.addToolBar(self.__profile)
to this
class ImageView(PlotWindow):
def __init__(self, parent=None, backend=None):
self.__profile = None
self.setProfileWindowBehavior('popup')
class ImageViewMainWindow(ImageView):
def __init__(self, parent=None, backend=None):
self.__profileMenu = None
def __updateProfileMenu(self):
if self.__profileMenu is None:
self.__profileMenu = self.menuBar().addMenu('Profile')
Or something like that? Up to you.
@t20100 I'm still bothered by this toolbar swapping. Would it be possible to have the behavior option in |
a6d5ac0
to
1dada63
Compare
@woutdenolf you're right, even if to me you only want to call Last commit moves the switch of behavior to the |
Should be fine now: no longer need for |
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.
Thanks @t20100 it's better:
- no swapping of toolbars
- no extra toolbar and manager classes in ImageView.py
- explicit default behavior
LGTM
This PR:
ImageView.get|setProfileWindowBehavior
method to change it to embed horizontal, vertical and cross profiles on the side widgets.ImageView.getProfileToolBar
and deprecatesImageView.profile
attribute.closes #3454