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

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Sep 24 12:46:03 PDT 2013


Author: annakrat
Date: 2013-09-24 12:46:03 -0700 (Tue, 24 Sep 2013)
New Revision: 57824

Modified:
   grass/trunk/gui/wxpython/animation/controller.py
Log:
wxGUI/animation: add busy info

Modified: grass/trunk/gui/wxpython/animation/controller.py
===================================================================
--- grass/trunk/gui/wxpython/animation/controller.py	2013-09-23 16:22:36 UTC (rev 57823)
+++ grass/trunk/gui/wxpython/animation/controller.py	2013-09-24 19:46:03 UTC (rev 57824)
@@ -495,6 +495,8 @@
                 animWinIndex.append(i)
         
         images = []
+        busy = wx.BusyInfo(message=_("Preparing export, please wait..."), parent=self.frame)
+        wx.Yield()
         for frameIndex in range(frameCount):
             image = wx.EmptyImage(*size)
             image.Replace(0, 0, 0, 255, 255, 255)
@@ -541,6 +543,7 @@
                 image.Paste(decImage, x, y)
 
             images.append(image)
+        del busy
 
         # export
         if exportInfo['method'] == 'sequence':
@@ -552,7 +555,7 @@
                                          exportInfo['format']['ext'])
                 image.SaveFile(os.path.join(exportInfo['directory'], filename), exportInfo['format']['type'])
 
-            busy.Destroy()
+            del busy
 
         elif exportInfo['method'] in ('gif', 'swf', 'avi'):
             pilImages = [WxImageToPil(image) for image in images]



More information about the grass-commit mailing list