[GRASS-SVN] r41199 - grass/branches/releasebranch_6_4/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Feb 27 08:20:31 EST 2010


Author: martinl
Date: 2010-02-27 08:20:31 -0500 (Sat, 27 Feb 2010)
New Revision: 41199

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/georect.py
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/toolbars.py
Log:
wxGUI: fix georect (#728)
(merge r41197 from trunk)


Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/georect.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/georect.py	2010-02-27 13:12:07 UTC (rev 41198)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/georect.py	2010-02-27 13:20:31 UTC (rev 41199)
@@ -196,6 +196,7 @@
             self.xy_mapdisp.SetTitle(_("GRASS GIS Map Display: 1" +
                                        " - Location: " + self.newlocation +
                                        " (source location)"))
+            self.xy_mapdisp.SetName("GRMapWindow")
 
             self.gcpmgr.SetMapDisplay(self.xy_mapdisp)
             
@@ -211,6 +212,7 @@
             #
             # show new display & draw map
             #
+            self.xy_mapdisp.toolbars['georect'].OnZoomMap(None)
             self.xy_mapdisp.CenterOnScreen()
             self.xy_mapdisp.Show()
             self.gcpmgr.Centre()

Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/toolbars.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/toolbars.py	2010-02-27 13:12:07 UTC (rev 41198)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/toolbars.py	2010-02-27 13:20:31 UTC (rev 41199)
@@ -177,6 +177,7 @@
         self.action = { 'id' : self.pointer }
         self.defaultAction = { 'id' : self.pointer,
                                'bind' : self.mapdisplay.OnPointer }
+        
         self.OnTool(None)
         
         self.FixSize(width = 90)
@@ -288,7 +289,7 @@
                      self.savefile,
                      self.printmap):
             self.toolbar.EnableTool(tool, enabled)
-
+        
 class GRToolbar(AbstractToolbar):
     """
     Georectification Display toolbar
@@ -308,6 +309,12 @@
         # realize the toolbar
         self.toolbar.Realize()
 
+        self.action = { 'id' : self.gcpset }
+        self.defaultAction = { 'id' : self.gcpset,
+                               'bind' : self.parent.OnPointer }
+        
+        self.OnTool(None)
+                
     def ToolbarData(self):
         """Toolbar data"""
 
@@ -356,10 +363,10 @@
     def OnZoomMap(self, event):
         """Zoom to selected map"""
         layer = self.mapcontent.GetListOfLayers()
-        
         self.mapdisplay.MapWindow.ZoomToMap(layer=layer)
         
-        event.Skip()
+        if event:
+            event.Skip()
         
 class GCPToolbar(AbstractToolbar):
     """



More information about the grass-commit mailing list