[GRASS-SVN] r35060 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Dec 27 11:37:17 EST 2008


Author: martinl
Date: 2008-12-27 11:37:17 -0500 (Sat, 27 Dec 2008)
New Revision: 35060

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/wxgui_utils.py
Log:
wxGUI: bogus rectangles on map display (trac #414)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py	2008-12-26 18:52:01 UTC (rev 35059)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py	2008-12-27 16:37:17 UTC (rev 35060)
@@ -3385,7 +3385,7 @@
         self.toolbars['map'].action['desc'] = 'modifyAttrb'
         
         self.MapWindow.mouse['use'] = "queryVector"
-        self.MapWindow.mouse['box'] = "box"
+        self.MapWindow.mouse['box'] = "point"
         self.MapWindow.pen = wx.Pen(colour='Red', width=2, style=wx.SHORT_DASH)
         self.MapWindow.zoomtype = 0
 

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py	2008-12-26 18:52:01 UTC (rev 35059)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py	2008-12-27 16:37:17 UTC (rev 35060)
@@ -630,6 +630,11 @@
         # disable the toolbar
         self.parent.RemoveToolbar ("vdigit")
 
+        # set default mouse settings
+        self.parent.MapWindow.mouse['use'] = "pointer"
+        self.parent.MapWindow.mouse['box'] = "point"
+        self.parent.MapWindow.polycoords = []
+        
     def OnMoveVertex(self, event):
         """Move line vertex"""
         Debug.msg(2, "Digittoolbar.OnMoveVertex():")

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/wxgui_utils.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/wxgui_utils.py	2008-12-26 18:52:01 UTC (rev 35059)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/wxgui_utils.py	2008-12-27 16:37:17 UTC (rev 35060)
@@ -487,15 +487,11 @@
         """
         Stop editing the current vector map layer
         """
-        try:
-            maplayer = self.GetPyData(self.layer_selected)[0]['maplayer']
-        except:
-            event.Skip()
-            return
-
+        maplayer = self.GetPyData(self.layer_selected)[0]['maplayer']
+        
         self.mapdisplay.toolbars['vdigit'].OnExit()
         self.mapdisplay.imgVectorMap = None
-
+        
     def OnSetBgMap(self, event):
         """Set background vector map for editing sesstion"""
         if event.IsChecked():



More information about the grass-commit mailing list