[GRASS-SVN] r57350 - in grass/trunk/gui/wxpython: gcp gui_core iclass mapdisp mapswipe
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Aug 1 13:43:06 PDT 2013
Author: annakrat
Date: 2013-08-01 13:43:06 -0700 (Thu, 01 Aug 2013)
New Revision: 57350
Modified:
grass/trunk/gui/wxpython/gcp/manager.py
grass/trunk/gui/wxpython/gcp/mapdisplay.py
grass/trunk/gui/wxpython/gui_core/mapdisp.py
grass/trunk/gui/wxpython/iclass/frame.py
grass/trunk/gui/wxpython/mapdisp/frame.py
grass/trunk/gui/wxpython/mapswipe/frame.py
Log:
wxGUI/statusbar: fix widgets repositioning
Modified: grass/trunk/gui/wxpython/gcp/manager.py
===================================================================
--- grass/trunk/gui/wxpython/gcp/manager.py 2013-08-01 20:15:48 UTC (rev 57349)
+++ grass/trunk/gui/wxpython/gcp/manager.py 2013-08-01 20:43:06 UTC (rev 57350)
@@ -1886,6 +1886,7 @@
"""
# 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
Modified: grass/trunk/gui/wxpython/gcp/mapdisplay.py
===================================================================
--- grass/trunk/gui/wxpython/gcp/mapdisplay.py 2013-08-01 20:15:48 UTC (rev 57349)
+++ grass/trunk/gui/wxpython/gcp/mapdisplay.py 2013-08-01 20:43:06 UTC (rev 57350)
@@ -141,6 +141,7 @@
# Bind various events
#
self.activemap.Bind(wx.EVT_CHOICE, self.OnUpdateActive)
+ self.Bind(wx.EVT_SIZE, self.OnSize)
#
# Update fancy gui style
Modified: grass/trunk/gui/wxpython/gui_core/mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/mapdisp.py 2013-08-01 20:15:48 UTC (rev 57349)
+++ grass/trunk/gui/wxpython/gui_core/mapdisp.py 2013-08-01 20:43:06 UTC (rev 57350)
@@ -118,7 +118,15 @@
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)
Modified: grass/trunk/gui/wxpython/iclass/frame.py
===================================================================
--- grass/trunk/gui/wxpython/iclass/frame.py 2013-08-01 20:15:48 UTC (rev 57349)
+++ grass/trunk/gui/wxpython/iclass/frame.py 2013-08-01 20:43:06 UTC (rev 57350)
@@ -178,6 +178,7 @@
wx.CallAfter(self.AddTrainingAreaMap)
self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
+ self.Bind(wx.EVT_SIZE, self.OnSize)
self.SendSizeEvent()
Modified: grass/trunk/gui/wxpython/mapdisp/frame.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/frame.py 2013-08-01 20:15:48 UTC (rev 57349)
+++ grass/trunk/gui/wxpython/mapdisp/frame.py 2013-08-01 20:43:06 UTC (rev 57350)
@@ -214,14 +214,6 @@
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
Modified: grass/trunk/gui/wxpython/mapswipe/frame.py
===================================================================
--- grass/trunk/gui/wxpython/mapswipe/frame.py 2013-08-01 20:15:48 UTC (rev 57349)
+++ grass/trunk/gui/wxpython/mapswipe/frame.py 2013-08-01 20:43:06 UTC (rev 57350)
@@ -221,6 +221,7 @@
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:
More information about the grass-commit
mailing list