[GRASS-dev] [GRASS GIS] #952: 'Highlight selected features and zoom' gives error when SQL display query is in effect

#952: 'Highlight selected features and zoom' gives error when SQL display query
is in effect
-----------------------------------------------+----------------------------
Reporter: epatton | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: normal | Milestone: 6.5.0
Component: wxGUI | Version: svn-develbranch6
Keywords: highlight, wxgui, attribute table | Platform: Linux
      Cpu: x86-64 |
-----------------------------------------------+----------------------------
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'
}}}

3. Close the d.vect window, open the Attribute Table Manager, enter a
'Simple' SQL query of FTYPE = 'LAKE/POND'
4. 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.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/952&gt;
GRASS GIS <http://grass.osgeo.org>