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

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Dec 27 11:41:22 EST 2008


Author: martinl
Date: 2008-12-27 11:41:22 -0500 (Sat, 27 Dec 2008)
New Revision: 35062

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/mapdisp.py
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/toolbars.py
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/wxgui_utils.py
Log:
wxGUI: bogus rectangles on map display (trac #414)
       (merge from devbr6, r35060)


Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/mapdisp.py	2008-12-27 16:41:09 UTC (rev 35061)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/mapdisp.py	2008-12-27 16:41:22 UTC (rev 35062)
@@ -3384,7 +3384,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/releasebranch_6_4/gui/wxpython/gui_modules/toolbars.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/toolbars.py	2008-12-27 16:41:09 UTC (rev 35061)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/toolbars.py	2008-12-27 16:41:22 UTC (rev 35062)
@@ -629,6 +629,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/releasebranch_6_4/gui/wxpython/gui_modules/wxgui_utils.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/wxgui_utils.py	2008-12-27 16:41:09 UTC (rev 35061)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/wxgui_utils.py	2008-12-27 16:41:22 UTC (rev 35062)
@@ -486,15 +486,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