浏览代码

wxGUI/composer: fix showing and hiding statusbar messages

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@56083 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 12 年之前
父节点
当前提交
e3f92ec0b6
共有 1 个文件被更改,包括 8 次插入2 次删除
  1. 8 2
      gui/wxpython/psmap/frame.py

+ 8 - 2
gui/wxpython/psmap/frame.py

@@ -365,6 +365,8 @@ class PsMapFrame(wx.Frame):
         grass.try_remove(event.userData['instrFile'])
         if event.userData['temp']:
             grass.try_remove(event.userData['filename'])
+            
+        wx.CallLater(4000, lambda: self.SetStatusText("", 0))
 
     def getFile(self, wildcard):
         suffix = []
@@ -1143,6 +1145,7 @@ class PsMapBufferedWindow(wx.Window):
         self.idLinePointsTmp = (wx.NewId(), wx.NewId()) # ids of marks for moving line vertices
 
         self.resizeBoxSize = wx.Size(8, 8)
+        self.showResizeHelp = False # helper for correctly working statusbar
         
         
 
@@ -1372,9 +1375,12 @@ class PsMapBufferedWindow(wx.Window):
             if foundResize and foundResize[0] in (self.idResizeBoxTmp,) + self.idLinePointsTmp:
                 self.SetCursor(self.cursors["sizenwse"])
                 self.parent.SetStatusText(_('Click and drag to resize object'), 0)
+                self.showResizeHelp = True
             else:
-                self.parent.SetStatusText('', 0)
-                self.SetCursor(self.cursors["default"])
+                if self.showResizeHelp:
+                    self.parent.SetStatusText('', 0)
+                    self.SetCursor(self.cursors["default"])
+                    self.showResizeHelp = False
                 
     def OnLeftDown(self, event):
         """!Left mouse button pressed.