[GRASS-dev] [GRASS GIS] #1987: wxGUI: traceback in map selection drop down

#1987: wxGUI: traceback in map selection drop down
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: trivial | Milestone: 6.4.3
Component: wxGUI | Version: svn-trunk
Keywords: list tree | Platform: Linux
      Cpu: x86-64 |
-----------------------+----------------------------------------------------
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

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

#1987: wxGUI: traceback in map selection drop down
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: trivial | Milestone: 6.4.3
Component: wxGUI | Version: svn-trunk
Keywords: list tree | Platform: Linux
      Cpu: x86-64 |
-----------------------+----------------------------------------------------

Comment(by annakrat):

Should be fixed in r56571-3 in all branches.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1987#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#1987: wxGUI: traceback in map selection drop down
----------------------+-----------------------------------------------------
  Reporter: hamish | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: trivial | Milestone: 6.4.3
Component: wxGUI | Version: svn-trunk
Resolution: fixed | Keywords: list tree
  Platform: Linux | Cpu: x86-64
----------------------+-----------------------------------------------------
Changes (by annakrat):

  * status: new => closed
  * resolution: => fixed

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1987#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#1987: wxGUI: traceback in map selection drop down
----------------------+-----------------------------------------------------
  Reporter: hamish | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: trivial | Milestone: 6.4.3
Component: wxGUI | Version: svn-trunk
Resolution: fixed | Keywords: list tree
  Platform: Linux | Cpu: x86-64
----------------------+-----------------------------------------------------

Comment(by 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:

{{{
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

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1987#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#1987: wxGUI: traceback in map selection drop down
----------------------+-----------------------------------------------------
  Reporter: hamish | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: trivial | Milestone: 6.4.3
Component: wxGUI | Version: svn-trunk
Resolution: fixed | Keywords: list tree
  Platform: Linux | Cpu: x86-64
----------------------+-----------------------------------------------------

Comment(by annakrat):

Replying to [comment:3 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.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1987#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>