Jelajahi Sumber

wxGUI/animation: automatically reload after adding animation

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@57931 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 11 tahun lalu
induk
melakukan
d425ae38d1
1 mengubah file dengan 5 tambahan dan 2 penghapusan
  1. 5 2
      gui/wxpython/animation/mapwindow.py

+ 5 - 2
gui/wxpython/animation/mapwindow.py

@@ -359,7 +359,9 @@ class BitmapProvider(object):
         count = 0
         maxLength = 0
         for raster, name in zip(rasters, names):
-            if not(name in self.bitmapPool and force is False):
+            if not force and name in self.bitmapPool and \
+               self.bitmapPool[name].GetSize() == (self.imageWidth, self.imageHeight):
+                continue
                 count += 1
                 if len(raster) > maxLength:
                     maxLength = len(raster)
@@ -400,7 +402,8 @@ class BitmapProvider(object):
         for mapname, name in zip(maps, names):
             count += 1
 
-            if name in self.bitmapPool and force is False:
+            if not force and name in self.bitmapPool and \
+               self.bitmapPool[name].GetSize() == (self.imageWidth, self.imageHeight):
                 continue
 
             # Queue object for interprocess communication