Bläddra i källkod

wxGUI/statusbar: fix widgets repositioning

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@57350 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 11 år sedan
förälder
incheckning
1867db3d69

+ 1 - 0
gui/wxpython/gcp/manager.py

@@ -1886,6 +1886,7 @@ class GCP(MapFrame, ColumnSorterMixin):
         """
         # re-render image on idle
         self.resize = time.clock()
+        super(MapFrame, self).OnSize(event)
 
     def OnIdle(self, event):
         """!GCP Map Display resized, adjust Map Windows

+ 1 - 0
gui/wxpython/gcp/mapdisplay.py

@@ -141,6 +141,7 @@ class MapFrame(SingleMapFrame):
         # Bind various events
         #
         self.activemap.Bind(wx.EVT_CHOICE, self.OnUpdateActive)
+        self.Bind(wx.EVT_SIZE, self.OnSize)
         
         #
         # Update fancy gui style

+ 8 - 0
gui/wxpython/gui_core/mapdisp.py

@@ -118,7 +118,15 @@ class MapFrameBase(wx.Frame):
         Map.ChangeMapSize(self.GetClientSize())
         Map.region = Map.GetRegion() # g.region -upgc
         # self.Map.SetRegion() # adjust region to match display window
+
+    def OnSize(self, event):
+        """!Adjust statusbar on changing size"""
+        # reposition checkbox in statusbar
+        self.StatusbarReposition()
         
+        # update statusbar
+        self.StatusbarUpdate()
+
     def SetProperty(self, name, value):
         """!Sets property"""
         self.statusbarManager.SetProperty(name, value)

+ 1 - 0
gui/wxpython/iclass/frame.py

@@ -178,6 +178,7 @@ class IClassMapFrame(DoubleMapFrame):
         wx.CallAfter(self.AddTrainingAreaMap)
         
         self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
+        self.Bind(wx.EVT_SIZE, self.OnSize)
 
         self.SendSizeEvent()
         

+ 0 - 8
gui/wxpython/mapdisp/frame.py

@@ -214,14 +214,6 @@ class MapFrame(SingleMapFrame):
         self.dialogs['query'] = None
 
         self.decorationDialog = None # decoration/overlays
-        
-    def OnSize(self, event):
-        """!Adjust statusbar on changing size"""
-        # reposition checkbox in statusbar
-        self.StatusbarReposition()
-        
-        # update statusbar
-        self.StatusbarUpdate()
 
     def GetMapWindow(self):
         return self.MapWindow

+ 1 - 0
gui/wxpython/mapswipe/frame.py

@@ -221,6 +221,7 @@ class SwipeMapFrame(DoubleMapFrame):
     def OnSize(self, event):
         Debug.msg (4, "SwipeMapFrame.OnSize()")
         self.resize = time.clock()
+        super(SwipeMapFrame, self).OnSize(event)
 
     def OnIdle(self, event):
         if self.resize and time.clock() - self.resize > 0.2: