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

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Sep 19 19:45:22 EDT 2009


Author: cmbarton
Date: 2009-09-19 19:45:22 -0400 (Sat, 19 Sep 2009)
New Revision: 39258

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp_window.py
Log:
Bug fix: dragging to draw a line for a profile transect or measuring no longer zooms window.

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp_window.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp_window.py	2009-09-19 23:44:10 UTC (rev 39257)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp_window.py	2009-09-19 23:45:22 UTC (rev 39258)
@@ -901,11 +901,14 @@
             if type(r) is list:
                 r = wx.Rect(r[0], r[1], r[2], r[3])
             r.Inflate(4, 4)
-            pdc.ClearId(boxid)
+            try:
+                pdc.ClearId(boxid)
+            except:
+                pass
             self.RefreshRect(r, False)
             pdc.SetId(boxid)
             self.Draw(pdc, drawid=boxid, pdctype='box', coords=mousecoords)
-        elif self.mouse['box'] == "line":
+        elif self.mouse['box'] == "line" or self.mouse['box'] == 'point':
             self.lineid = wx.ID_NEW
             mousecoords = [begin[0], begin[1], \
                            end[0], end[1]]



More information about the grass-commit mailing list