[GRASS-SVN] r65590 - grass/branches/releasebranch_7_0/gui/wxpython/animation

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jul 14 12:09:54 PDT 2015


Author: annakrat
Date: 2015-07-14 12:09:54 -0700 (Tue, 14 Jul 2015)
New Revision: 65590

Modified:
   grass/branches/releasebranch_7_0/gui/wxpython/animation/controller.py
Log:
wxGUI/animation: fix exporting animation with multiple views and no data frames (merge from trunk, r65589)

Modified: grass/branches/releasebranch_7_0/gui/wxpython/animation/controller.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/animation/controller.py	2015-07-14 19:06:35 UTC (rev 65589)
+++ grass/branches/releasebranch_7_0/gui/wxpython/animation/controller.py	2015-07-14 19:09:54 UTC (rev 65590)
@@ -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