[GRASS-SVN] r70504 - in grass/branches/releasebranch_7_0/gui/wxpython: core vdigit

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Feb 8 07:18:15 PST 2017


Author: martinl
Date: 2017-02-08 07:18:15 -0800 (Wed, 08 Feb 2017)
New Revision: 70504

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


Modified: grass/branches/releasebranch_7_0/gui/wxpython/core/settings.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/core/settings.py	2017-02-08 15:01:33 UTC (rev 70503)
+++ grass/branches/releasebranch_7_0/gui/wxpython/core/settings.py	2017-02-08 15:18:15 UTC (rev 70504)
@@ -442,7 +442,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_0/gui/wxpython/vdigit/wxdisplay.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/vdigit/wxdisplay.py	2017-02-08 15:01:33 UTC (rev 70503)
+++ grass/branches/releasebranch_7_0/gui/wxpython/vdigit/wxdisplay.py	2017-02-08 15:18:15 UTC (rev 70504)
@@ -1034,6 +1034,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