[GRASS-SVN] r58578 - grass/trunk/gui/wxpython/animation

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jan 1 17:44:15 PST 2014


Author: annakrat
Date: 2014-01-01 17:44:15 -0800 (Wed, 01 Jan 2014)
New Revision: 58578

Modified:
   grass/trunk/gui/wxpython/animation/data.py
   grass/trunk/gui/wxpython/animation/frame.py
   grass/trunk/gui/wxpython/animation/provider.py
   grass/trunk/gui/wxpython/animation/temporal_manager.py
Log:
wxGUI/animation: remove redundant tgis.init() calls

Modified: grass/trunk/gui/wxpython/animation/data.py
===================================================================
--- grass/trunk/gui/wxpython/animation/data.py	2014-01-01 21:57:27 UTC (rev 58577)
+++ grass/trunk/gui/wxpython/animation/data.py	2014-01-02 01:44:15 UTC (rev 58578)
@@ -268,7 +268,6 @@
         Layer.__init__(self)
         self._mapTypes.extend(['strds', 'stvds', 'str3ds'])
         self._maps = []
-        tgis.init()
 
     def SetName(self, name):
         if not self.hidden:

Modified: grass/trunk/gui/wxpython/animation/frame.py
===================================================================
--- grass/trunk/gui/wxpython/animation/frame.py	2014-01-01 21:57:27 UTC (rev 58577)
+++ grass/trunk/gui/wxpython/animation/frame.py	2014-01-02 01:44:15 UTC (rev 58578)
@@ -26,6 +26,7 @@
 if __name__ == '__main__':
     sys.path.append(os.path.join(os.environ['GISBASE'], "etc", "gui", "wxpython"))
 import grass.script as gcore
+import grass.temporal as tgis
 from core import globalvar
 from gui_core.widgets import IntegerValidator
 from core.gcmd import RunCommand
@@ -58,6 +59,9 @@
 
         self.SetIcon(wx.Icon(os.path.join(globalvar.ETCICONDIR, 'grass_map.ico'), wx.BITMAP_TYPE_ICO))
 
+        # Make sure the temporal database exists
+        tgis.init()
+
         self.animations = [Animation() for i in range(MAX_COUNT)]
         self.windows = []
         self.animationPanel = AnimationsPanel(self, self.windows, initialCount=MAX_COUNT)

Modified: grass/trunk/gui/wxpython/animation/provider.py
===================================================================
--- grass/trunk/gui/wxpython/animation/provider.py	2014-01-01 21:57:27 UTC (rev 58577)
+++ grass/trunk/gui/wxpython/animation/provider.py	2014-01-02 01:44:15 UTC (rev 58578)
@@ -739,6 +739,8 @@
     from core.layerlist import LayerList, Layer
     from animation.data import AnimLayer
     from animation.utils import layerListToCmdsMatrix
+    import grass.temporal as tgis
+    tgis.init()
 
     layerList = LayerList()
     layer = AnimLayer()

Modified: grass/trunk/gui/wxpython/animation/temporal_manager.py
===================================================================
--- grass/trunk/gui/wxpython/animation/temporal_manager.py	2014-01-01 21:57:27 UTC (rev 58577)
+++ grass/trunk/gui/wxpython/animation/temporal_manager.py	2014-01-02 01:44:15 UTC (rev 58578)
@@ -53,9 +53,6 @@
 
         self.granularityMode = GranularityMode.ORIGINAL
 
-        # Make sure the temporal database exists
-        tgis.init()
-
     def GetTemporalType(self):
         """!Get temporal type (TemporalType.ABSOLUTE, TemporalType.RELATIVE)"""
         return self._temporalType
@@ -346,6 +343,8 @@
 
 def test():
     from pprint import pprint
+    # Make sure the temporal database exists
+    tgis.init()
 
     temp = TemporalManager()
 #    timeseries = createAbsolutePoint()



More information about the grass-commit mailing list