We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In 0.13.3 I was able to add additional items to the menu of the histogram gradient. The changes in 0.13.4 mean that this now gives a TypeError
TypeError
File ".../pyqtgraph/graphicsItems/GradientEditorItem.py", line 499, in contextMenuClicked name, source = action.data() TypeError: cannot unpack non-iterable NoneType objec
import pyqtgraph as pg import numpy as np from pyqtgraph.Qt import QtWidgets app = pg.mkQApp("ImageView Example") win = QtWidgets.QMainWindow() img = pg.ImageView() img.setImage(np.zeros((100,100))) win.setCentralWidget(img) action = QtWidgets.QAction("Test") action.triggered.connect(lambda :print("Action triggered")) menu = img.getHistogramWidget().gradient.menu menu.addAction(action) win.show() if __name__ == '__main__': pg.exec()
Add a new menu entry that can be used. (works in 0.13..3)
Menu item works, but gives the above error message
I think this was introduced by #2779 c2372a2
The menu items in the GradientEditorItem are now expected to have data, that is used to change the gradient:
name, source = action.data()
I can provide a patch
The text was updated successfully, but these errors were encountered:
Your test script works without error with the current PR #2955
Sorry, something went wrong.
I have just tested #2955, and it does fix this issue that we are hitting in mantidimaging
Thanks for testing; there's something I wanted to add to #2955 and will likely cut a pyqtgraph release after that gets added and the PR gets merged.
No branches or pull requests
Short description
In 0.13.3 I was able to add additional items to the menu of the histogram gradient. The changes in 0.13.4 mean that this now gives a
TypeError
Code to reproduce
Expected behavior
Add a new menu entry that can be used. (works in 0.13..3)
Real behavior
Menu item works, but gives the above error message
Tested environment(s)
Additional context
I think this was introduced by
#2779
c2372a2
The menu items in the GradientEditorItem are now expected to have data, that is used to change the gradient:
name, source = action.data()
I can provide a patch
The text was updated successfully, but these errors were encountered: