瀏覽代碼

wxGUI/animation: always create new temporary file

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@59344 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 11 年之前
父節點
當前提交
bc1b9b7cf6
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      gui/wxpython/animation/frame.py

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

@@ -43,7 +43,7 @@ from animation.utils import Orientation, ReplayMode, TemporalType
 
 
 MAX_COUNT = 4
-TMP_DIR = tempfile.mkdtemp()
+TMP_DIR = None
 
 gcore.set_raise_on_error(True)
 
@@ -62,6 +62,9 @@ class AnimationFrame(wx.Frame):
         # Make sure the temporal database exists
         tgis.init()
 
+        global TMP_DIR
+        TMP_DIR = tempfile.mkdtemp()
+
         self.animations = [Animation() for i in range(MAX_COUNT)]
         self.windows = []
         self.animationPanel = AnimationsPanel(self, self.windows, initialCount=MAX_COUNT)