Opened 14 years ago

#952 new defect

'Highlight selected features and zoom' gives error when SQL display query is in effect

Reported by: epatton Owned by: grass-dev@…
Priority: normal Milestone: 6.5.0
Component: wxGUI Version: svn-develbranch6
Keywords: highlight, wxgui, attribute table Cc:
CPU: x86-64 Platform: Linux

Description

I think I've uncovered a subtle bug in the wxgui Attribute Table Manager (it took about two hours to figure out):

(in NC dataset):

  1. Load the lakes vector into the Layer Manager
  2. Right-click on lakes, go to Properties/Selection, and enter an SQL display query like
FTYPE = 'LAKE/POND'
  1. Close the d.vect window, open the Attribute Table Manager, enter a 'Simple' SQL query of FTYPE = 'LAKE/POND'
  2. Select multiple records from the attribute table, right-click and choose either 'Highlight selected features', or 'Highlight selected features and zoom', which should give the following error:
 File
"/usr/local/grass-6.5.svn/etc/wxpython/gui_modules/dbm.py",
line 1326, in OnDataDrawSelectedZoom

self._drawSelected(zoom=True)
  File
"/usr/local/grass-6.5.svn/etc/wxpython/gui_modules/dbm.py",
line 1274, in _drawSelected

self.AddQueryMapLayer() # -> self.qlayer
  File
"/usr/local/grass-6.5.svn/etc/wxpython/gui_modules/dbm.py",
line 2108, in AddQueryMapLayer

self.qlayer =
self.mapdisplay.AddTmpVectorMapLayer(self.vectorName, cats)
  File "/usr/local/grass-6.5.svn/etc/wxpython/gui_modules/ma
pdisp.py", line 1576, in AddTmpVectorMapLayer

parg,pval = p.split('=')
ValueError
:
too many values to unpack

The aggravating part was that if I only did an attribute table SQL query and highlight/zoom records, it's fine. It's only an error when there is a display query *and* an attribute table query at the same time.

~ Eric.

Change History (0)

Note: See TracTickets for help on using tickets.