[GRASS-SVN] r58068 - in grass/trunk/gui/wxpython: mapdisp nviz
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Oct 19 19:45:36 PDT 2013
Author: annakrat
Date: 2013-10-19 19:45:36 -0700 (Sat, 19 Oct 2013)
New Revision: 58068
Modified:
grass/trunk/gui/wxpython/mapdisp/statusbar.py
grass/trunk/gui/wxpython/nviz/mapwindow.py
grass/trunk/gui/wxpython/nviz/wxnviz.py
Log:
wxGUI: remove wx.Yield from progress bar because with wxpython 2.9 it causes problems
Modified: grass/trunk/gui/wxpython/mapdisp/statusbar.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/statusbar.py 2013-10-20 02:10:52 UTC (rev 58067)
+++ grass/trunk/gui/wxpython/mapdisp/statusbar.py 2013-10-20 02:45:36 UTC (rev 58068)
@@ -1104,19 +1104,7 @@
return self.widget.IsShown()
def SetValue(self, value):
- """!Sets value of progressbar.
-
- Calls wx.Yield which allows
- to update gui for displaying progress.
- """
- self.SafeSetValue(value)
- wx.Yield()
-
- def SafeSetValue(self, value):
- """! Thread save SetValue method.
-
- Needed for wxNVIZ.
- """
+ """!Sets value of progressbar."""
if value > self.GetRange():
self.Hide()
return
Modified: grass/trunk/gui/wxpython/nviz/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/nviz/mapwindow.py 2013-10-20 02:10:52 UTC (rev 58067)
+++ grass/trunk/gui/wxpython/nviz/mapwindow.py 2013-10-20 02:45:36 UTC (rev 58068)
@@ -1168,10 +1168,10 @@
if self.render['quick'] is False:
self.parent.GetProgressBar().Show()
self.parent.GetProgressBar().SetRange(2)
- self.parent.GetProgressBar().SafeSetValue(0)
+ self.parent.GetProgressBar().SetValue(0)
if self.render['quick'] is False:
- self.parent.GetProgressBar().SafeSetValue(1)
+ self.parent.GetProgressBar().SetValue(1)
self._display.Draw(False, -1)
if self.saveHistory:
self.ViewHistory(view = self.view, iview = self.iview)
@@ -1207,7 +1207,7 @@
stop = time.clock()
if self.render['quick'] is False:
- self.parent.GetProgressBar().SafeSetValue(2)
+ self.parent.GetProgressBar().SetValue(2)
# hide process bar
self.parent.GetProgressBar().Hide()
Modified: grass/trunk/gui/wxpython/nviz/wxnviz.py
===================================================================
--- grass/trunk/gui/wxpython/nviz/wxnviz.py 2013-10-20 02:10:52 UTC (rev 58067)
+++ grass/trunk/gui/wxpython/nviz/wxnviz.py 2013-10-20 02:45:36 UTC (rev 58068)
@@ -70,7 +70,7 @@
if progress:
if not progress.GetRange() == 100:
progress.SetRange(100)
- progress.SafeSetValue(value)
+ progress.SetValue(value)
else:
print value
More information about the grass-commit
mailing list