ソースを参照

wxGUI/animation: add busy info

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@57824 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 11 年 前
コミット
9b2be94a2f
1 ファイル変更4 行追加1 行削除
  1. 4 1
      gui/wxpython/animation/controller.py

+ 4 - 1
gui/wxpython/animation/controller.py

@@ -495,6 +495,8 @@ class AnimationController(wx.EvtHandler):
                 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 @@ class AnimationController(wx.EvtHandler):
                 image.Paste(decImage, x, y)
 
             images.append(image)
+        del busy
 
         # export
         if exportInfo['method'] == 'sequence':
@@ -552,7 +555,7 @@ class AnimationController(wx.EvtHandler):
                                          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]