[GRASS-SVN] r57816 - grass/trunk/gui/wxpython/animation
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Sep 22 20:59:29 PDT 2013
Author: annakrat
Date: 2013-09-22 20:59:28 -0700 (Sun, 22 Sep 2013)
New Revision: 57816
Modified:
grass/trunk/gui/wxpython/animation/controller.py
Log:
wxGUI/animation: fix legend when showing 3d
Modified: grass/trunk/gui/wxpython/animation/controller.py
===================================================================
--- grass/trunk/gui/wxpython/animation/controller.py 2013-09-23 03:28:30 UTC (rev 57815)
+++ grass/trunk/gui/wxpython/animation/controller.py 2013-09-23 03:59:28 UTC (rev 57816)
@@ -368,6 +368,7 @@
self._load2DData(animData)
else:
self._load3DData(animData)
+ self._loadLegend(animData)
# clear bitmapPool
usedNames = []
@@ -382,7 +383,20 @@
prov.SetData(datasource = animationData.mapData, dataType=animationData.inputMapType)
prov.Load()
+
+ def _load3DData(self, animationData):
+ prov = self.bitmapProviders[animationData.windowIndex]
+ nviz = animationData.GetNvizCommands()
+ prov.SetData(datasource = nviz['commands'],
+ dataNames = animationData.mapData, dataType = 'nviz',
+ suffix = animationData.nvizParameter,
+ nvizRegion = nviz['region'])
+
+ self.bitmapProviders[animationData.windowIndex].Load()
+
+ def _loadLegend(self, animationData):
if animationData.legendCmd:
+ prov = self.bitmapProviders[animationData.windowIndex]
try:
# place legend
x, y = 0.1, 0.1
@@ -396,16 +410,6 @@
except GException:
GError(message=_("Failed to display legend."))
- def _load3DData(self, animationData):
- prov = self.bitmapProviders[animationData.windowIndex]
- nviz = animationData.GetNvizCommands()
- prov.SetData(datasource = nviz['commands'],
- dataNames = animationData.mapData, dataType = 'nviz',
- suffix = animationData.nvizParameter,
- nvizRegion = nviz['region'])
-
- self.bitmapProviders[animationData.windowIndex].Load()
-
def EvaluateInput(self, animationData):
stds = 0
maps = 0
More information about the grass-commit
mailing list