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

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jan 1 16:01:09 EST 2009


Author: cmbarton
Date: 2009-01-01 16:01:09 -0500 (Thu, 01 Jan 2009)
New Revision: 35148

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
Log:
Fix for hidden overlay option windows on Mac. Also fix to clear display after measurement.

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py	2009-01-01 18:10:55 UTC (rev 35147)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py	2009-01-01 21:01:09 UTC (rev 35148)
@@ -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
@@ -792,6 +791,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()
 
         #
@@ -1079,7 +1090,7 @@
         elif event.Moving():
             self.OnMouseMoving(event)
 
-        event.Skip()
+#        event.Skip()
         
     def OnMouseWheel(self, event):
         """
@@ -1113,7 +1124,7 @@
 
         self.Refresh()
         self.processMouse = True
-        event.Skip()
+#        event.Skip()
 
     def OnDragging(self, event):
         """
@@ -1150,7 +1161,7 @@
                 # draw box only when left mouse button is pressed
                 self.MouseDraw(pdc=self.pdcTmp)
       
-        event.Skip()
+#        event.Skip()
 
     def OnLeftDown(self, event):
         """
@@ -1704,16 +1715,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
@@ -1728,7 +1738,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
@@ -1759,7 +1769,7 @@
             elif self.dragid == 1:
                 self.parent.OnAddLegend(None)
                 
-        event.Skip()
+#        event.Skip()
 
     def OnRightDown(self, event):
         """



More information about the grass-commit mailing list