[GRASS-dev] [GRASS GIS] #2848: g.gui.vdigit: snapping distance seems to only be defined in map units, not screen pixels

GRASS GIS trac at osgeo.org
Mon Sep 26 08:34:37 PDT 2016


#2848: g.gui.vdigit: snapping distance seems to only be defined in map units, not
screen pixels
--------------------------+---------------------------------
  Reporter:  mlennert     |      Owner:  grass-dev@…
      Type:  defect       |     Status:  new
  Priority:  major        |  Milestone:  7.0.5
 Component:  wxGUI        |    Version:  svn-releasebranch70
Resolution:               |   Keywords:  vector, digitize
       CPU:  Unspecified  |   Platform:  Unspecified
--------------------------+---------------------------------

Comment (by mlennert):

 Replying to [comment:10 annakrat]:
 > Replying to [comment:9 mlennert]:
 > > Replying to [comment:8 annakrat]:
 > > > Replying to [comment:7 mlennert]:
 > > > > Replying to [comment:6 annakrat]:
 > > > > > Please test. It was only problem when using different locale.
 > > > >
 > > > > Right. It +/- works now, i.e. when I chose "screen pixels", I now
 get the correct value in map units below. However, when I change the value
 (i.e. the number of screen pixels), I get a wrong number below: the number
 of screen pixels instead of map units. I have to switch to map units and
 back to screen pixels for the depicted value in map units to be correct
 again.
 > > >
 > > > OK, I committed a new fix in r69579.
 > >
 > > Seems to work great, now ! Thanks.
 > >
 > > Not sure if this is mature enough to backport to release70. You're a
 better judge of that.
 >
 > The only problem is in the settings. The old value should be ignored and
 then new value (0 or 1 is saved). You can test it by manually changing the
 values in the settings file. Since you didn't report any problem with the
 new patch I assume it ignores your saved settings value ("screen pixels"
 or the french version), but please check, you should have now there 0 or 1
 if you saved the settings.

 I'm not sure I saved these settings before. Now, I do have

 {{{
 vdigit;snapping;units;0;value;20
 }}}

 However, when I now try to open the settings dialog in the grass 7.0.5
 digitizer, I get:

 {{{
 Traceback (most recent call last):
   File
 "/data/home/mlennert/SRC/GRASS/grass70_release/dist.x86_64
 -pc-linux-gnu/gui/wxpython/vdigit/toolbars.py", line 528, in
 OnSettings

 self.settingsDialog = VDigitSettingsDialog(parent =
 self.parent, giface = self._giface)
   File
 "/data/home/mlennert/SRC/GRASS/grass70_release/dist.x86_64
 -pc-linux-gnu/gui/wxpython/vdigit/preferences.py", line 43,
 in __init__

 self._createGeneralPage(notebook)
   File
 "/data/home/mlennert/SRC/GRASS/grass70_release/dist.x86_64
 -pc-linux-gnu/gui/wxpython/vdigit/preferences.py", line 168,
 in _createGeneralPage

 self.snappingUnit.SetStringSelection(UserSettings.Get(group
 = 'vdigit', key = "snapping", subkey = 'units'))
   File "/usr/lib/python2.7/dist-
 packages/wx-3.0-gtk2/wx/_core.py", line 13002, in
 SetStringSelection

 return _core_.ItemContainer_SetStringSelection(*args,
 **kwargs)
 TypeError
 :
 String or Unicode type required
 }}}

 so there is an issue of backwards compatibility....

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2848#comment:11>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list