浏览代码

wxGUI/d.mon: fix exiting (https://trac.osgeo.org/grass/ticket/3897)

Anna Petrasova 5 年之前
父节点
当前提交
383650806c
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      gui/wxpython/mapdisp/main.py

+ 3 - 1
gui/wxpython/mapdisp/main.py

@@ -563,10 +563,12 @@ class MapApp(wx.App):
     def OnExit(self):
     def OnExit(self):
         if __name__ == "__main__":
         if __name__ == "__main__":
             # stop the timer
             # stop the timer
-            # self.timer.Stop()
+            if self.timer.IsRunning:
+                self.timer.Stop()
             # terminate thread
             # terminate thread
             for f in six.itervalues(monFile):
             for f in six.itervalues(monFile):
                 try_remove(f)
                 try_remove(f)
+        return True
 
 
     def watcher(self):
     def watcher(self):
         """Redraw, if new layer appears (check's timestamp of
         """Redraw, if new layer appears (check's timestamp of