[GRASS-SVN] r41200 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Feb 27 08:33:16 EST 2010


Author: martinl
Date: 2010-02-27 08:33:16 -0500 (Sat, 27 Feb 2010)
New Revision: 41200

Modified:
   grass/trunk/gui/wxpython/gui_modules/mapdisp_window.py
Log:
wxGUI: middle-click+drag to pan the map


Modified: grass/trunk/gui/wxpython/gui_modules/mapdisp_window.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/mapdisp_window.py	2010-02-27 13:20:31 UTC (rev 41199)
+++ grass/trunk/gui/wxpython/gui_modules/mapdisp_window.py	2010-02-27 13:33:16 UTC (rev 41200)
@@ -1145,13 +1145,14 @@
         previous = self.mouse['begin']
         move = (current[0] - previous[0],
                 current[1] - previous[1])
-
+        
         digitToolbar = self.parent.toolbars['vdigit']
-
+        
         # dragging or drawing box with left button
-        if self.mouse['use'] == 'pan':
+        if self.mouse['use'] == 'pan' or \
+                event.MiddleIsDown():
             self.DragMap(move)
-
+        
         # dragging decoration overlay item
         elif (self.mouse['use'] == 'pointer' and 
                 not digitToolbar and 



More information about the grass-commit mailing list