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

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jul 14 12:06:35 PDT 2015


Author: annakrat
Date: 2015-07-14 12:06:35 -0700 (Tue, 14 Jul 2015)
New Revision: 65589

Modified:
   grass/trunk/gui/wxpython/animation/controller.py
Log:
wxGUI/animation: fix exporting animation with multiple views and no data frames

Modified: grass/trunk/gui/wxpython/animation/controller.py
===================================================================
--- grass/trunk/gui/wxpython/animation/controller.py	2015-07-14 15:50:20 UTC (rev 65588)
+++ grass/trunk/gui/wxpython/animation/controller.py	2015-07-14 19:06:35 UTC (rev 65589)
@@ -492,6 +492,7 @@
         images = []
         busy = wx.BusyInfo(message=_("Preparing export, please wait..."), parent=self.frame)
         wx.Yield()
+        lastBitmaps = {}
         for frameIndex in range(frameCount):
             image = wx.EmptyImage(*size)
             image.Replace(0, 0, 0, 255, 255, 255)
@@ -502,9 +503,15 @@
                                         subkey=['nodata', 'enable']):
                     if frameId is not None:
                         bitmap = self.bitmapProvider.GetBitmap(frameId)
+                        lastBitmaps[i] = bitmap
+                    else:
+                        if i not in lastBitmaps:
+                            lastBitmaps[i] = wx.NullBitmap()
                 else:
                     bitmap = self.bitmapProvider.GetBitmap(frameId)
-                im = wx.ImageFromBitmap(bitmap)
+                    lastBitmaps[i] = bitmap
+                
+                im = wx.ImageFromBitmap(lastBitmaps[i])
 
                 # add legend if used
                 legend = legends[i]



More information about the grass-commit mailing list