Browse Source

wxGUI: add waiting cursor for histogram +scatter wxplot tools (trunk, https://trac.osgeo.org/grass/changeset/66625 + https://trac.osgeo.org/grass/changeset/66640)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@66642 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Neteler 9 years ago
parent
commit
3acf7fc4bb
2 changed files with 7 additions and 0 deletions
  1. 3 0
      gui/wxpython/wxplot/histogram.py
  2. 4 0
      gui/wxpython/wxplot/scatter.py

+ 3 - 0
gui/wxpython/wxplot/histogram.py

@@ -84,9 +84,12 @@ class HistogramPlotFrame(BasePlotFrame):
             pass
         
         self.SetGraphStyle()
+        wx.BeginBusyCursor()
+        wx.SafeYield()
         self.SetupHistogram()
         p = self.CreatePlotList()
         self.DrawPlot(p)
+        wx.EndBusyCursor()
 
     def OnSelectRaster(self, event):
         """Select raster map(s) to profile

+ 4 - 0
gui/wxpython/wxplot/scatter.py

@@ -79,11 +79,15 @@ class ScatterFrame(BasePlotFrame):
         """
         self.SetCursor(wx.StockCursor(wx.CURSOR_ARROW))
         self.SetGraphStyle()
+        wx.BeginBusyCursor()
+        wx.SafeYield()
         self.SetupScatterplot()
         p = self.CreatePlotList()
         if p:
             self.DrawPlot(p)
+            wx.EndBusyCursor()
         else:
+            wx.EndBusyCursor()
             GMessage(_("Nothing to plot."), parent = self)
 
     def OnSelectRaster(self, event):