[GRASS-SVN] r57424 - in grass/trunk/gui/wxpython: gcp iclass mapdisp mapswipe vdigit

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Aug 6 03:32:07 PDT 2013


Author: annakrat
Date: 2013-08-06 03:32:07 -0700 (Tue, 06 Aug 2013)
New Revision: 57424

Modified:
   grass/trunk/gui/wxpython/gcp/mapdisplay.py
   grass/trunk/gui/wxpython/iclass/digit.py
   grass/trunk/gui/wxpython/iclass/frame.py
   grass/trunk/gui/wxpython/mapdisp/frame.py
   grass/trunk/gui/wxpython/mapdisp/mapwindow.py
   grass/trunk/gui/wxpython/mapdisp/test_mapdisp.py
   grass/trunk/gui/wxpython/mapswipe/frame.py
   grass/trunk/gui/wxpython/mapswipe/mapwindow.py
   grass/trunk/gui/wxpython/vdigit/mapwindow.py
Log:
wxGUI: remove frame parameter from BufferedWindow

Modified: grass/trunk/gui/wxpython/gcp/mapdisplay.py
===================================================================
--- grass/trunk/gui/wxpython/gcp/mapdisplay.py	2013-08-06 09:15:59 UTC (rev 57423)
+++ grass/trunk/gui/wxpython/gcp/mapdisplay.py	2013-08-06 10:32:07 UTC (rev 57424)
@@ -116,12 +116,12 @@
         self.grwiz.SwitchEnv('source')
         self.SrcMapWindow = BufferedWindow(parent=self, giface=self._giface, id=wx.ID_ANY,
                                            properties=self.mapWindowProperties,
-                                           Map=self.SrcMap, frame=self)
+                                           Map=self.SrcMap)
 
         self.grwiz.SwitchEnv('target')
         self.TgtMapWindow = BufferedWindow(parent=self, giface=self._giface, id=wx.ID_ANY,
                                            properties=self.mapWindowProperties,
-                                          Map=self.TgtMap, frame=self)
+                                          Map=self.TgtMap)
         self.MapWindow = self.SrcMapWindow
         self.Map = self.SrcMap
         self._setUpMapWindow(self.SrcMapWindow)

Modified: grass/trunk/gui/wxpython/iclass/digit.py
===================================================================
--- grass/trunk/gui/wxpython/iclass/digit.py	2013-08-06 09:15:59 UTC (rev 57423)
+++ grass/trunk/gui/wxpython/iclass/digit.py	2013-08-06 10:32:07 UTC (rev 57424)
@@ -34,7 +34,7 @@
 
 class IClassVDigitWindow(VDigitWindow):
     """! Class similar to VDigitWindow but specialized for wxIClass."""
-    def __init__(self, parent, giface, map, frame, properties):
+    def __init__(self, parent, giface, map, properties):
         """!
         
         @a parent should has toolbar providing current class (category).
@@ -43,7 +43,7 @@
         @param map map renderer instance
         """
         VDigitWindow.__init__(self, parent=parent, giface=giface,
-                              Map=map, frame=frame, properties=properties)
+                              Map=map, properties=properties)
 
     def _onLeftDown(self, event):
         action = self.toolbar.GetAction()

Modified: grass/trunk/gui/wxpython/iclass/frame.py
===================================================================
--- grass/trunk/gui/wxpython/iclass/frame.py	2013-08-06 09:15:59 UTC (rev 57423)
+++ grass/trunk/gui/wxpython/iclass/frame.py	2013-08-06 10:32:07 UTC (rev 57424)
@@ -95,10 +95,10 @@
 
         self.firstMapWindow = IClassVDigitWindow(parent = self, giface = self._giface,
                                                  properties=self.mapWindowProperties,
-                                                 map = self.firstMap, frame = self)
+                                                 map = self.firstMap)
         self.secondMapWindow = BufferedWindow(parent = self, giface = self._giface,
                                               properties=self.mapWindowProperties,
-                                              Map = self.secondMap, frame = self)
+                                              Map = self.secondMap)
         self.MapWindow = self.firstMapWindow # current by default
         
         self._bindWindowsActivation()

Modified: grass/trunk/gui/wxpython/mapdisp/frame.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/frame.py	2013-08-06 09:15:59 UTC (rev 57423)
+++ grass/trunk/gui/wxpython/mapdisp/frame.py	2013-08-06 10:32:07 UTC (rev 57424)
@@ -154,8 +154,8 @@
         #
         # Init map display (buffered DC & set default cursor)
         #
-        self.MapWindow2D = BufferedWindow(self, giface = self._giface, id = wx.ID_ANY,
-                                          Map=self.Map, frame=self,
+        self.MapWindow2D = BufferedWindow(self, giface = self._giface,
+                                          Map=self.Map,
                                           properties=self.mapWindowProperties,
                                           overlays=self.decorations)
         self.MapWindow2D.mapQueried.connect(self.Query)
@@ -244,11 +244,10 @@
         
         if not self.MapWindowVDigit:
             from vdigit.mapwindow import VDigitWindow
-            self.MapWindowVDigit = VDigitWindow(parent = self, giface = self._giface,
-                                                id = wx.ID_ANY, frame = self,
-                                                Map = self.Map, tree = self.tree,
+            self.MapWindowVDigit = VDigitWindow(parent=self, giface=self._giface,
                                                 properties=self.mapWindowProperties,
-                                                lmgr = self._layerManager,
+                                                Map=self.Map, tree=self.tree,
+                                                lmgr=self._layerManager,
                                                 overlays=self.decorations)
             self._setUpMapWindow(self.MapWindowVDigit)
             self.MapWindowVDigit.digitizingInfo.connect(

Modified: grass/trunk/gui/wxpython/mapdisp/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/mapwindow.py	2013-08-06 09:15:59 UTC (rev 57423)
+++ grass/trunk/gui/wxpython/mapdisp/mapwindow.py	2013-08-06 10:32:07 UTC (rev 57424)
@@ -57,23 +57,22 @@
     can also save the drawing to file by calling the
     SaveToFile() method.
     """
-    def __init__(self, parent, giface, Map, frame, properties,
+    def __init__(self, parent, giface, Map, properties,
                  id=wx.ID_ANY, overlays=None,
                  style = wx.NO_FULL_REPAINT_ON_RESIZE, **kwargs):
         """!
         @param parent parent window
         @param giface grass interface instance
         @param Map map instance
-        @param frame map frame instance (to be removed)
+        @param properties instance of MapWindowProperties
         @param id wx window id
         @param style wx window style
         @param kwargs keyword arguments passed to MapWindow and wx.Window
         """
         MapWindow.__init__(self, parent=parent, giface=giface, Map=Map)
-        wx.Window.__init__(self, parent = parent, id = id, style = style, **kwargs)
+        wx.Window.__init__(self, parent=parent, id=id, style=style, **kwargs)
 
         self._properties = properties
-        self.frame = frame  # remove including a frame parameter
 
         # flags
         self.resize = False # indicates whether or not a resize event has taken place

Modified: grass/trunk/gui/wxpython/mapdisp/test_mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/test_mapdisp.py	2013-08-06 09:15:59 UTC (rev 57423)
+++ grass/trunk/gui/wxpython/mapdisp/test_mapdisp.py	2013-08-06 10:32:07 UTC (rev 57424)
@@ -175,7 +175,7 @@
         width, height = self.frame.GetClientSize()
         copyOfInitMap(map_, width, height)
         window = BufferedWindow(parent=panel, giface=giface, Map=map_,
-                                properties=mapWindowProperties, frame=self.frame)
+                                properties=mapWindowProperties)
         sizer.Add(item=window, proportion=1, flag=wx.EXPAND | wx.ALL, border=5)
         panel.SetSizer(sizer)
         panel.Layout()
@@ -205,7 +205,7 @@
         width, height = self.frame.GetClientSize()
         copyOfInitMap(map_, width, height)
         window = BufferedWindow(parent=panel, giface=giface, Map=map_,
-                                properties=mapWindowProperties, frame=self.frame)
+                                properties=mapWindowProperties)
 
         giface.mapWindow = window
 
@@ -235,7 +235,7 @@
         width, height = self.frame.GetClientSize()
         copyOfInitMap(map_, width, height)
         window = BufferedWindow(parent=panel, giface=giface, Map=map_,
-                                properties=mapWindowProperties, frame=self.frame)
+                                properties=mapWindowProperties)
 
         giface.mapWindow = window
 
@@ -266,7 +266,7 @@
         width, height = self.frame.GetClientSize()
         copyOfInitMap(map_, width, height)
         window = BufferedWindow(parent=panel, giface=giface, Map=map_,
-                                properties=mapWindowProperties, frame=self.frame)
+                                properties=mapWindowProperties)
 
         giface.mapWindow = window
 

Modified: grass/trunk/gui/wxpython/mapswipe/frame.py
===================================================================
--- grass/trunk/gui/wxpython/mapswipe/frame.py	2013-08-06 09:15:59 UTC (rev 57423)
+++ grass/trunk/gui/wxpython/mapswipe/frame.py	2013-08-06 10:32:07 UTC (rev 57424)
@@ -66,10 +66,10 @@
         self.mapWindowProperties.autoRenderChanged.connect(self.OnAutoRenderChanged)
         self.firstMapWindow = SwipeBufferedWindow(parent = self.splitter, giface = self._giface,
                                                   properties=self.mapWindowProperties,
-                                                  Map = self.firstMap, frame = self)
+                                                  Map = self.firstMap)
         self.secondMapWindow = SwipeBufferedWindow(parent = self.splitter, giface = self._giface,
                                                    properties=self.mapWindowProperties,
-                                                   Map = self.secondMap, frame = self)
+                                                   Map = self.secondMap)
         self.MapWindow = self.firstMapWindow # current by default
         self.firstMapWindow.zoomhistory = self.secondMapWindow.zoomhistory
         self.SetBindRegions(True)

Modified: grass/trunk/gui/wxpython/mapswipe/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/mapswipe/mapwindow.py	2013-08-06 09:15:59 UTC (rev 57423)
+++ grass/trunk/gui/wxpython/mapswipe/mapwindow.py	2013-08-06 10:32:07 UTC (rev 57424)
@@ -36,9 +36,8 @@
     Enables to draw the image translated.
     Special mouse events with changed coordinates are used.
     """
-    def __init__(self, parent, giface, Map, properties, frame, **kwargs):
-        BufferedWindow.__init__(self, parent = parent, giface = giface,
-                                Map=Map, frame=frame,
+    def __init__(self, parent, giface, Map, properties, **kwargs):
+        BufferedWindow.__init__(self, parent=parent, giface=giface, Map=Map, 
                                 properties=properties, **kwargs)
         Debug.msg(2, "SwipeBufferedWindow.__init__()")
 

Modified: grass/trunk/gui/wxpython/vdigit/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/vdigit/mapwindow.py	2013-08-06 09:15:59 UTC (rev 57423)
+++ grass/trunk/gui/wxpython/vdigit/mapwindow.py	2013-08-06 10:32:07 UTC (rev 57424)
@@ -32,12 +32,12 @@
 class VDigitWindow(BufferedWindow):
     """!A Buffered window extended for vector digitizer.
     """
-    def __init__(self, parent, giface, Map, frame, properties, tree=None,
+    def __init__(self, parent, giface, Map, properties, tree=None,
                  id=wx.ID_ANY, lmgr=None,
                  style = wx.NO_FULL_REPAINT_ON_RESIZE, **kwargs):
-        BufferedWindow.__init__(self, parent = parent, giface = giface, id = id, Map = Map,
+        BufferedWindow.__init__(self, parent=parent, giface=giface, Map=Map,
                                 properties=properties,
-                                frame=frame, style=style, **kwargs)
+                                style=style, **kwargs)
         self.lmgr = lmgr
         self.tree = tree
         self.pdcVector = wx.PseudoDC()



More information about the grass-commit mailing list