[GRASS-dev] [GRASS GIS] #2088: G7: digitizer python error

#2088: G7: digitizer python error
-------------------------------+--------------------------------------------
Reporter: neteler | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: digitizer, python | Platform: Linux
      Cpu: x86-64 |
-------------------------------+--------------------------------------------
The wxGUI digitizer shows this problem:

{{{
Traceback (most recent call last):
   File "/home/neteler/grass70/dist.x86_64-unknown-linux-
gnu/etc/gui/wxpython/mapwin/buffered.py", line 1025, in
MouseActions

self.OnLeftUp(event)
   File "/home/neteler/grass70/dist.x86_64-unknown-linux-
gnu/etc/gui/wxpython/mapwin/buffered.py", line 1206, in
OnLeftUp

self._onLeftUp(event)
   File "/home/neteler/grass70/dist.x86_64-unknown-linux-
gnu/etc/gui/wxpython/vdigit/mapwindow.py", line 850, in
_onLeftUp

self.OnLeftUpCopyLine(event)
   File "/home/neteler/grass70/dist.x86_64-unknown-linux-
gnu/etc/gui/wxpython/vdigit/mapwindow.py", line 758, in
OnLeftUpCopyLine

nselected = self.bdigit.GetDisplay().SelectLinesByBox((pos1,
pos2))
AttributeError
:
'VDigitWindow' object has no attribute 'bdigit'
}}}

To reproduce it:
  * NC location
  * load and show the "geology" map
  * start the digitizer from the map display window
  * create a new vector map

Note: the "geology" map disappears, "Render map" icon shows it again

  * From "Additional tools": select "Copy feature from (background) vector
map

The error message appears (see above).

Furthermore there is no dialog from which vector map the user could copy
from (should be one of the maps loaded into the layer manager).

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

#2088: G7: digitizer python error
-------------------------------+--------------------------------------------
Reporter: neteler | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: digitizer, python | Platform: Linux
      Cpu: x86-64 |
-------------------------------+--------------------------------------------

Comment(by martinl):

Replying to [ticket:2088 neteler]:

{{{
> nselected = self.bdigit.GetDisplay().SelectLinesByBox((pos1,
> pos2))
> AttributeError
> :
> 'VDigitWindow' object has no attribute 'bdigit'
}}}

it seems to a typo, should be fixed in r58935.

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

#2088: G7: digitizer python error
-------------------------------+--------------------------------------------
Reporter: neteler | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: digitizer, python | Platform: Linux
      Cpu: x86-64 |
-------------------------------+--------------------------------------------

Comment(by martinl):

Replying to [ticket:2088 neteler]:

> Furthermore there is no dialog from which vector map the user could copy
from (should be one of the maps loaded into the layer manager).

A new dialog introduced in r58937. Selecting background map from layer
tree has been disabled.

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

#2088: G7: digitizer python error
-------------------------------+--------------------------------------------
Reporter: neteler | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: digitizer, python | Platform: Linux
      Cpu: x86-64 |
-------------------------------+--------------------------------------------

Comment(by martinl):

Replying to [ticket:2088 neteler]:

> Note: the "geology" map disappears, "Render map" icon shows it again

should be fixed in r58939 (no idea why this code has such effect). Testing
welcomed. Martin

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

#2088: G7: digitizer python error
-------------------------------+--------------------------------------------
Reporter: neteler | Owner: martinl
     Type: defect | Status: assigned
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: digitizer, python | Platform: Linux
      Cpu: x86-64 |
-------------------------------+--------------------------------------------
Changes (by martinl):

* cc: grass-dev@… (added)
  * owner: grass-dev@… => martinl
  * status: new => assigned

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

#2088: G7: digitizer python error
-------------------------------+--------------------------------------------
Reporter: neteler | Owner: martinl
     Type: defect | Status: assigned
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: digitizer, python | Platform: Linux
      Cpu: x86-64 |
-------------------------------+--------------------------------------------

Comment(by wenzeslaus):

Replying to [comment:3 martinl]:
> Replying to [ticket:2088 neteler]:
>
> > Note: the "geology" map disappears, "Render map" icon shows it again
>
> should be fixed in r58939 (no idea why this code has such effect).
Testing welcomed. Martin

This hiding of layers (not showing rendered layers in map window) happens
a lot, especially with vectors. I have no idea what's behind.

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

#2088: G7: digitizer python error
-------------------------------+--------------------------------------------
Reporter: neteler | Owner: martinl
     Type: defect | Status: assigned
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: digitizer, python | Platform: Linux
      Cpu: x86-64 |
-------------------------------+--------------------------------------------

Comment(by martinl):

Replying to [comment:5 wenzeslaus]:

> This hiding of layers (not showing rendered layers in map window)
happens a lot, especially with vectors. I have no idea what's behind.

I discovered that `CheckItem()` callled in `AddLayer()`
source:grass/trunk/gui/wxpython/lmgr/layertree.py#L1103 causes that
`Map.layers` appears to be empty (even there are maps in layer tree). I
really have no idea why. Anyway `wx.CallAfter()` avoids it (at least it
seems to)

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

#2088: G7: digitizer python error
-------------------------------+--------------------------------------------
Reporter: neteler | Owner: martinl
     Type: defect | Status: assigned
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: digitizer, python | Platform: Linux
      Cpu: x86-64 |
-------------------------------+--------------------------------------------

Comment(by wenzeslaus):

Replying to [comment:6 martinl]:
> Replying to [comment:5 wenzeslaus]:
>
> > This hiding of layers (not showing rendered layers in map window)
happens a lot, especially with vectors. I have no idea what's behind.
>
> I discovered that `CheckItem()` callled in `AddLayer()`
source:grass/trunk/gui/wxpython/lmgr/layertree.py#L1103 causes that
`Map.layers` appears to be empty (even there are maps in layer tree). I
really have no idea why. Anyway `wx.CallAfter()` avoids it (at least it
seems to)

So, r58939 fixed the problem I had which occurred when you used `d.vect`
from Command console in GUI or when vector map was output of some module
(and map was added automatically). Thanks.

I agree that `wx.CallAfter()` is probably workaround for some problem but
there is no other option now.

How about the original reported issue? Can we close the ticket?

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

#2088: G7: digitizer python error
----------------------+-----------------------------------------------------
  Reporter: neteler | Owner: martinl
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Resolution: fixed | Keywords: digitizer, python
  Platform: Linux | Cpu: x86-64
----------------------+-----------------------------------------------------
Changes (by neteler):

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

Comment:

The original issue has been fixed, thanks!

Closing.

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