[GRASS-SVN] r42053 - grass-addons/gui/wxpython/data_catalog

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Apr 28 13:14:23 EDT 2010


Author: rashadkm
Date: 2010-04-28 13:14:22 -0400 (Wed, 28 Apr 2010)
New Revision: 42053

Modified:
   grass-addons/gui/wxpython/data_catalog/mapdisplay.py
Log:
added zoom for planet sasha

Modified: grass-addons/gui/wxpython/data_catalog/mapdisplay.py
===================================================================
--- grass-addons/gui/wxpython/data_catalog/mapdisplay.py	2010-04-28 15:24:32 UTC (rev 42052)
+++ grass-addons/gui/wxpython/data_catalog/mapdisplay.py	2010-04-28 17:14:22 UTC (rev 42053)
@@ -1162,6 +1162,7 @@
         self.Zoom(begin, end, zoomtype)
 
         # redraw map
+        self.flag=True
         self.UpdateMap()
 
         ### self.OnPaint(None)
@@ -2081,7 +2082,7 @@
 
         self.ZoomHistory(self.Map.region['n'], self.Map.region['s'],
                          self.Map.region['e'], self.Map.region['w'])
-
+        self.flag = True
         self.UpdateMap()
 
         self.parent.StatusbarUpdate()
@@ -2095,7 +2096,9 @@
 
         self.ZoomHistory(self.Map.region['n'], self.Map.region['s'],
                          self.Map.region['e'], self.Map.region['w'])
-
+        
+        
+        self.flag=True
         self.UpdateMap()
 
         self.parent.StatusbarUpdate()
@@ -2495,6 +2498,10 @@
         self.viewInfo = True        #to display v/r.info on mapdisplay
         self.gisdbase = self.gisrc['GISDBASE'] 
 
+        self.current_zoom = 100
+        self.zoom_step = 10
+
+
         parent1 = self.GetParent()
         
         rightpanel = parent1.GetParent()
@@ -2534,7 +2541,14 @@
 
     def OnClick(self,event):
         x, y = self.MapWindow.Pixel2Cell(event.GetPosition())
-        self.frame.mInfo.SetValue(str(x) + ' , ' + str(y))
+        if self.MapWindow.mouse['use'] == "zoom":
+            self.current_zoom = self.current_zoom + self.zoom_step
+        self.frame.mInfo.SetValue(str(x) + ' , ' + str(y)+ ' , ' + str(self.current_zoom) + '%')
+
+
+        #print self.current_zoom
+
+
         event.Skip()
 
     def read_gisrc(self):
@@ -2935,6 +2949,9 @@
         Zoom in the map.
         Set mouse cursor, zoombox attributes, and zoom direction
         """
+        
+        self.zoom_step = 10
+     
         if self.toolbars['map']:
             self.toolbars['map'].OnTool(event)
             self.toolbars['map'].action['desc'] = ''
@@ -2952,6 +2969,9 @@
         Zoom out the map.
         Set mouse cursor, zoombox attributes, and zoom direction
         """
+
+        self.zoom_step = -10
+
         if self.toolbars['map']:
             self.toolbars['map'].OnTool(event)
             self.toolbars['map'].action['desc'] = ''
@@ -2997,6 +3017,7 @@
         """
         self.Map.getRegion()
         self.Map.getResolution()
+        self.flag=True
         self.UpdateMap()
         # event.Skip()
 



More information about the grass-commit mailing list