Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#1987 closed defect (fixed)

wxGUI: traceback in map selection drop down

Reported by: hamish Owned by: grass-dev@…
Priority: trivial Milestone: 6.4.3
Component: wxGUI Version: svn-trunk
Keywords: list tree Cc:
CPU: x86-64 Platform: Linux

Description

Hi,

here's a traceback from the map selection dropdown list. all 6.4.3svn -- 7.svn.

start the wxGUI. Add a raster or vector map. At the d.rast/d.vect dialog click the arrow to get the list of map names to select from. On one of the {>,v} Mapset: lines, on the bar to the _right_ of the words click and drag the left mouse button a little and you trigger it. In 6.4.3svn clicking on the mapset text closes the selector prematurely, in trunk it doesn't, but you get the same traceback error.

Traceback (most recent call last):
  File "/usr/lib64/python2.6/dist-
packages/wx-2.8-gtk2-unicode/wx/lib/mixins/treemixin.py",
line 502, in OnBeginDrag

if self.IsValidDragItem(self._dragItem):
  File "/usr/lib64/python2.6/dist-
packages/wx-2.8-gtk2-unicode/wx/lib/mixins/treemixin.py",
line 569, in IsValidDragItem

return dragItem and dragItem != self.GetRootItem()
  File "/usr/lib64/python2.6/dist-
packages/wx-2.8-gtk2-unicode/wx/_controls.py", line 5051, in
__ne__

return _controls_.TreeItemId___ne__(*args, **kwargs)
TypeError
:
in method 'TreeItemId___ne__', expected argument 2 of type
'wxTreeItemId const *'

tested on debian/squeeze 64bit.

thanks, Hamish

Change History (4)

comment:1 by annakrat, 11 years ago

Should be fixed in r56571-3 in all branches.

comment:2 by annakrat, 11 years ago

Resolution: fixed
Status: newclosed

comment:3 by hamish, 11 years ago

tested in all branches, works great, thanks.

I notice I can right-click on a map name in the map selection drop down, and it shows me the map layer context menu. Not surprisingly, clicking on one of the menu entries (e.g. opacity) from there before a map is selected leads to another traceback:

Traceback (most recent call last):
  File "/home/hamish/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/lmgr/layertree.py", line
676, in OnPopupOpacityLevel

self.ChangeLayerOpacity(layer = self.layer_selected, value =
dlg.GetOpacity())
  File "/home/hamish/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/lmgr/layertree.py", line
692, in ChangeLayerOpacity

self._getLayerName(layer))
  File "/usr/lib64/python2.6/dist-
packages/wx-2.8-gtk2-unicode/wx/lib/agw/customtreectrl.py",
line 2431, in SetItemText

self.CalculateSize(item, dc)
  File "/usr/lib64/python2.6/dist-
packages/wx-2.8-gtk2-unicode/wx/lib/agw/customtreectrl.py",
line 5655, in CalculateSize

text_w, text_h, dummy =
dc.GetMultiLineTextExtent(item.GetText())
  File "/usr/lib64/python2.6/dist-
packages/wx-2.8-gtk2-unicode/wx/_gdi.py", line 3775, in
GetMultiLineTextExtent

return _gdi_.DC_GetMultiLineTextExtent(*args, **kwargs)
TypeError
:
String or Unicode type required

Hamish

in reply to:  3 comment:4 by annakrat, 11 years ago

Replying to hamish:

tested in all branches, works great, thanks.

I notice I can right-click on a map name in the map selection drop down, and it shows me the map layer context menu. Not surprisingly, clicking on one of the menu entries (e.g. opacity) from there before a map is selected leads to another traceback:

This is a mistake, events are propagating to layer manager. Fixed in r56582-4.

Note: See TracTickets for help on using tickets.