[GRASS-SVN] r59783 - grass/trunk/gui/wxpython/wxplot

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Apr 18 08:18:01 PDT 2014


Author: annakrat
Date: 2014-04-18 08:18:01 -0700 (Fri, 18 Apr 2014)
New Revision: 59783

Modified:
   grass/trunk/gui/wxpython/wxplot/base.py
   grass/trunk/gui/wxpython/wxplot/dialogs.py
   grass/trunk/gui/wxpython/wxplot/profile.py
   grass/trunk/gui/wxpython/wxplot/scatter.py
Log:
wxGUI/wxplot: fix a few issues related to wxPython 3

Modified: grass/trunk/gui/wxpython/wxplot/base.py
===================================================================
--- grass/trunk/gui/wxpython/wxplot/base.py	2014-04-18 14:03:59 UTC (rev 59782)
+++ grass/trunk/gui/wxpython/wxplot/base.py	2014-04-18 15:18:01 UTC (rev 59783)
@@ -443,12 +443,10 @@
     def OnMotion(self, event):
         """!Indicate when mouse is outside the plot area
         """
-        if self.client.OnLeave(event): print 'out of area'
-        #show closest point (when enbled)
         if self.client.GetEnablePointLabel() == True:
             #make up dict with info for the pointLabel
             #I've decided to mark the closest point on the closest curve
-            dlst =  self.client.GetClosetPoint( self.client._getXY(event), pointScaled =  True)
+            dlst = self.client.GetClosestPoint(self.client._getXY(event), pointScaled=True)
             if dlst != []:      #returns [] if none
                 curveNum, legend, pIndex, pointXY, scaledXY, distance = dlst
                 #make up dictionary to pass to my user function (see DrawPointLabel)

Modified: grass/trunk/gui/wxpython/wxplot/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/wxplot/dialogs.py	2014-04-18 14:03:59 UTC (rev 59782)
+++ grass/trunk/gui/wxpython/wxplot/dialogs.py	2014-04-18 15:18:01 UTC (rev 59783)
@@ -99,8 +99,7 @@
     def OnSelection(self, event):
         """!Choose maps to profile. Convert these into a list
         """
-        self.rasterList = []
-        self.rasterList = event.GetString().split(',')
+        self.rasterList = self.FindWindowById(event.GetId()).GetValue().split(',')
 
 class ScatterRasterDialog(wx.Dialog):
     def __init__(self, parent, id = wx.ID_ANY, 
@@ -207,7 +206,7 @@
     def OnSelection(self, event):
         """!Select raster maps for scatterplot. Must select maps in pairs.
         """
-        self.rasterList = event.GetString().split(',', 1)
+        self.rasterList = self.FindWindowById(event.GetId()).GetValue().split(',', 1)
         
     def OnSetBins(self, event):
         """!Bins for histogramming FP maps (=nsteps in r.stats)

Modified: grass/trunk/gui/wxpython/wxplot/profile.py
===================================================================
--- grass/trunk/gui/wxpython/wxplot/profile.py	2014-04-18 14:03:59 UTC (rev 59782)
+++ grass/trunk/gui/wxpython/wxplot/profile.py	2014-04-18 15:18:01 UTC (rev 59783)
@@ -120,7 +120,7 @@
         """!Select raster map(s) to profile
         """
         dlg = ProfileRasterDialog(parent = self)
-
+        dlg.CenterOnParent()
         if dlg.ShowModal() == wx.ID_OK:
             self.rasterList = dlg.rasterList
             self.raster = self.InitRasterOpts(self.rasterList, self.plottype)

Modified: grass/trunk/gui/wxpython/wxplot/scatter.py
===================================================================
--- grass/trunk/gui/wxpython/wxplot/scatter.py	2014-04-18 14:03:59 UTC (rev 59782)
+++ grass/trunk/gui/wxpython/wxplot/scatter.py	2014-04-18 15:18:01 UTC (rev 59783)
@@ -88,7 +88,7 @@
         """!Select raster map(s) to profile
         """
         dlg = ScatterRasterDialog(parent = self)
-
+        dlg.CenterOnParent()
         if dlg.ShowModal() == wx.ID_OK:
             self.rasterList = dlg.GetRasterPairs()
             if not self.rasterList:



More information about the grass-commit mailing list