Opened 7 years ago

Last modified 7 months ago

#1735 new defect

WXGUI attribute table manager doesn't meet with 1 normal form

Reported by: marisn Owned by: grass-dev@…
Priority: normal Milestone: 7.6.2
Component: wxGUI Version: svn-trunk
Keywords: Cc:
CPU: Unspecified Platform: Unspecified

Description

WXGUI attribute table manager expects CAT column to be first one. (There's no left-to-right ordering to the columns.) If CAT is not the first column, zoom to feature functionality fails. Other functionality involving selected rows was not tested.

Traceback (most recent call last):
  File "/home/maris/soft/grass_trunk/dist.x86_64-unknown-
linux-gnu/etc/gui/wxpython/dbmgr/base.py", line 1682, in
OnDataDrawSelectedZoom

self._drawSelected(zoom = True)
  File "/home/maris/soft/grass_trunk/dist.x86_64-unknown-
linux-gnu/etc/gui/wxpython/dbmgr/base.py", line 1554, in
_drawSelected

cats = map(int, tlist.GetSelectedItems())
ValueError
:
invalid literal for int() with base 10: '-0.358800000000002'

Here "-0.XXX' is value of a first column displayed in attribute manager. Database connection points to CAT column displayed as a second column.

Change History (10)

comment:1 Changed 7 years ago by martinl

Milestone: 6.4.4

comment:2 Changed 4 years ago by neteler

Milestone: 6.4.46.4.6

comment:3 Changed 3 years ago by marisn

It is still an issue with 7.2: #3291

comment:4 Changed 3 years ago by mlennert

AFAICT, the problem comes from the fact that both GetSelectedItems() and GetItems() call GetItemText? which in the wxpython < Phoenix returns the first column. In Phoenix it apparently takes an argument col= which allows to chose a specific column by index.

Probably, the solution would be to rewrite GetSelectedItems? and GetItems? to get the entire data row and then select the relevant column...

comment:5 Changed 3 years ago by mlennert

Milestone: 6.4.67.2.1

comment:6 Changed 3 years ago by martinl

Milestone: 7.2.17.2.2

comment:7 Changed 2 years ago by neteler

Milestone: 7.2.27.2.3

Ticket retargeted after milestone closed

comment:8 Changed 20 months ago by martinl

Milestone: 7.2.3

Ticket retargeted after milestone closed

comment:9 Changed 20 months ago by martinl

Milestone: 7.2.4

comment:10 Changed 7 months ago by martinl

Milestone: 7.2.47.6.2
Note: See TracTickets for help on using tickets.