[GRASS-SVN] r70503 - in grass/branches/releasebranch_7_2/gui/wxpython: core vdigit

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Feb 8 07:01:33 PST 2017


Author: martinl
Date: 2017-02-08 07:01:33 -0800 (Wed, 08 Feb 2017)
New Revision: 70503

Modified:
   grass/branches/releasebranch_7_2/gui/wxpython/core/settings.py
   grass/branches/releasebranch_7_2/gui/wxpython/vdigit/wxdisplay.py
Log:
digitizer - moving a vertex doesn't work (see #3266)


Modified: grass/branches/releasebranch_7_2/gui/wxpython/core/settings.py
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/core/settings.py	2017-02-08 09:44:11 UTC (rev 70502)
+++ grass/branches/releasebranch_7_2/gui/wxpython/core/settings.py	2017-02-08 15:01:33 UTC (rev 70503)
@@ -453,7 +453,8 @@
                 },
                 'selectThresh': {
                     'value': 10,
-                    'units': 'screen pixels'
+                    'unit': 0,  # new
+                    'units': 'screen pixels'  # old for backwards comp.
                 },
                 'checkForDupl': {
                     'enabled': False

Modified: grass/branches/releasebranch_7_2/gui/wxpython/vdigit/wxdisplay.py
===================================================================
--- grass/branches/releasebranch_7_2/gui/wxpython/vdigit/wxdisplay.py	2017-02-08 09:44:11 UTC (rev 70502)
+++ grass/branches/releasebranch_7_2/gui/wxpython/vdigit/wxdisplay.py	2017-02-08 15:01:33 UTC (rev 70503)
@@ -1108,6 +1108,10 @@
 
         if units is None:
             units = UserSettings.Get(group='vdigit', key=type, subkey='unit')
+            if units is None:
+                # old for backwards comp.
+                units = UserSettings.Get(group='vdigit', key=type, subkey='units')
+                units = 0 if units == 'screen pixels' else 1
 
         if value < 0:
             value = (self.region['nsres'] + self.region['ewres']) / 2.0



More information about the grass-commit mailing list