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

Fix wxGUI Histogramming Tool Plot xSpec, ySpec property value #422

Merged

Conversation

tmszi
Copy link
Member

@tmszi tmszi commented Mar 16, 2020

Reproduce:

  1. In the Layer Manager toolbar click on the Add raster map layer icon tool
  2. Right click on the added raster layer to invoke layer menu and click on the Histogram menu item
  3. On the Histogramming Tool frame toolbar click on the Settings icon tool menu and choose Plot settings (open dialog)
  4. On the Plot settings dialog, change X-Axis Scale option to the custom type, and set Custom min and max value, and change Y-Axis Scale same too
  5. On the Plot settings dialog click on the Ok button
  6. Close Histogramming Tool frame
  7. Reopen Histogramming Tool frame

Error message appear in the Console page:

Traceback (most recent call last):
  File "/usr/local/grass79/gui/wxpython/lmgr/layertree.py",
line 1130, in OnHistogram

win = HistogramPlotFrame(parent=self, rasterList=rasterList)
  File
"/usr/local/grass79/gui/wxpython/wxplot/histogram.py", line
73, in __init__

self._initOpts()
  File
"/usr/local/grass79/gui/wxpython/wxplot/histogram.py", line
85, in _initOpts

self.InitPlotOpts('histogram')
  File "/usr/local/grass79/gui/wxpython/wxplot/base.py",
line 199, in InitPlotOpts

self.client.xSpec =
self.properties['x-axis']['prop']['type']
  File "/usr/lib/python3/dist-
packages/wx/lib/plot/plotcanvas.py", line 1564, in xSpec

if not isinstance(value, (list, tuple)) and len(value != 2):
TypeError
:
object of type 'bool' has no len()

@landam landam added bug Something isn't working GUI wxGUI related labels Mar 16, 2020
@landam landam added this to the 7.8.3 milestone Mar 16, 2020
@petrasovaa petrasovaa self-requested a review March 18, 2020 02:01
@petrasovaa petrasovaa merged commit 3dcfda8 into OSGeo:master Mar 20, 2020
petrasovaa pushed a commit that referenced this pull request Mar 20, 2020
HuidaeCho pushed a commit to HuidaeCho/grass that referenced this pull request Mar 20, 2020
@tmszi tmszi deleted the fix_histogram_custom_type_xspec_yspec_property branch July 28, 2020 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working GUI wxGUI related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants