[GRASS-SVN] r35153 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jan 1 18:14:39 EST 2009
Author: cmbarton
Date: 2009-01-01 18:14:38 -0500 (Thu, 01 Jan 2009)
New Revision: 35153
Modified:
grass/trunk/gui/wxpython/gui_modules/mapdisp.py
Log:
New merge from develbranch_6 to fix hidden overlay property windows on Mac and fix to clear measurement lines (missed from previous merge and commit).
Modified: grass/trunk/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/mapdisp.py 2009-01-01 23:06:43 UTC (rev 35152)
+++ grass/trunk/gui/wxpython/gui_modules/mapdisp.py 2009-01-01 23:14:38 UTC (rev 35153)
@@ -48,13 +48,12 @@
sys.path.append(CompatPath)
from compat import subprocess
-import grass
-
gmpath = os.path.join(globalvar.ETCWXDIR, "icons")
sys.path.append(gmpath)
import render
import toolbars
+import grassenv
import track
import menuform
import gselect
@@ -793,6 +792,18 @@
coordtype = 'mapcoord'
self.parent.gismanager.georectifying.DrawGCP(coordtype)
+ #
+ # clear measurement
+ #
+
+ if self.mouse["use"] == "measure":
+ self.ClearLines(pdc=self.pdcTmp)
+ self.polycoords = []
+ self.mouse['use'] = 'pointer'
+ self.mouse['box'] = 'point'
+ self.mouse['end'] = [0, 0]
+ self.SetCursor(self.parent.cursors["default"])
+
stop = time.clock()
#
@@ -1080,7 +1091,7 @@
elif event.Moving():
self.OnMouseMoving(event)
- event.Skip()
+# event.Skip()
def OnMouseWheel(self, event):
"""
@@ -1114,7 +1125,7 @@
self.Refresh()
self.processMouse = True
- event.Skip()
+# event.Skip()
def OnDragging(self, event):
"""
@@ -1151,7 +1162,7 @@
# draw box only when left mouse button is pressed
self.MouseDraw(pdc=self.pdcTmp)
- event.Skip()
+# event.Skip()
def OnLeftDown(self, event):
"""
@@ -1705,16 +1716,15 @@
self.textdict[self.dragid]['coords'] = self.pdc.GetIdBounds(self.dragid)
else:
pass
+ self.dragid = None
+ self.currtxtid = None
+# self.UpdateMap(render=True)
else:
pass
+
+# event.Skip()
- self.dragid = None
- self.currtxtid = None
- self.UpdateMap(render=True)
-
- event.Skip()
-
def OnButtonDClick(self, event):
"""
Mouse button double click
@@ -1729,7 +1739,7 @@
self.mouse['use'] = 'pointer'
self.mouse['box'] = 'point'
self.mouse['end'] = [0, 0]
- ### self.Refresh()
+ self.Refresh()
self.SetCursor(self.parent.cursors["default"])
elif self.mouse["use"] == "profile":
# profile
@@ -1760,7 +1770,7 @@
elif self.dragid == 1:
self.parent.OnAddLegend(None)
- event.Skip()
+# event.Skip()
def OnRightDown(self, event):
"""
@@ -4094,7 +4104,7 @@
gm_map.mapFrm.SetTitle ("GRASS GIS - Map Display: " + title + " - Location: " + \
grass.gisenv()['LOCATION_NAME'])
gm_map.MainLoop()
-
+
os.remove(cmdfilename)
os.system("""g.gisenv set="GRASS_PYCMDFILE" """)
More information about the grass-commit
mailing list