Explorar o código

digitizer - moving a vertex doesn't work (fix https://trac.osgeo.org/grass/ticket/3266)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@70504 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa %!s(int64=8) %!d(string=hai) anos
pai
achega
3e60f42fed
Modificáronse 2 ficheiros con 6 adicións e 1 borrados
  1. 2 1
      gui/wxpython/core/settings.py
  2. 4 0
      gui/wxpython/vdigit/wxdisplay.py

+ 2 - 1
gui/wxpython/core/settings.py

@@ -442,7 +442,8 @@ class Settings:
                     },
                 'selectThresh' : {
                     'value' : 10,
-                    'units' : 'screen pixels'
+                    'unit': 0,  # new
+                    'units': 'screen pixels'  # old for backwards comp.
                     },
                 'checkForDupl' : {
                     'enabled' : False

+ 4 - 0
gui/wxpython/vdigit/wxdisplay.py

@@ -1034,6 +1034,10 @@ class DisplayDriver:
         
         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