[GRASS-SVN] r65157 - grass/trunk/gui/wxpython/mapwin
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Apr 27 12:04:19 PDT 2015
Author: martinl
Date: 2015-04-27 12:04:19 -0700 (Mon, 27 Apr 2015)
New Revision: 65157
Modified:
grass/trunk/gui/wxpython/mapwin/decorations.py
Log:
wxGUI: define OverlayId class
Modified: grass/trunk/gui/wxpython/mapwin/decorations.py
===================================================================
--- grass/trunk/gui/wxpython/mapwin/decorations.py 2015-04-27 15:57:55 UTC (rev 65156)
+++ grass/trunk/gui/wxpython/mapwin/decorations.py 2015-04-27 19:04:19 UTC (rev 65157)
@@ -31,7 +31,11 @@
except ImportError:
hasPIL = False
-
+class OverlayId:
+ legendId = 0
+ barscaleId = 1
+ arrowId = 2
+
class OverlayController(object):
"""Base class for decorations (barscale, legend) controller."""
@@ -191,7 +195,7 @@
def __init__(self, renderer, giface):
OverlayController.__init__(self, renderer, giface)
- self._id = 1
+ self._id = OverlayId.barscaleId
self._name = 'barscale'
# different from default because the reference point is not in the middle
self._defaultAt = 'at=0,98'
@@ -202,7 +206,7 @@
def __init__(self, renderer, giface):
OverlayController.__init__(self, renderer, giface)
- self._id = 2
+ self._id = OverlayId.arrowId
self._name = 'arrow'
# different from default because the reference point is not in the middle
self._defaultAt = 'at=85.0,25.0'
@@ -213,7 +217,7 @@
def __init__(self, renderer, giface):
OverlayController.__init__(self, renderer, giface)
- self._id = 0
+ self._id = OverlayId.legendId
self._name = 'legend'
# TODO: synchronize with d.legend?
self._defaultAt = 'at=5,50,7,10'
More information about the grass-commit
mailing list