[GRASS-SVN] r39288 - grass/trunk/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Sep 24 15:46:36 EDT 2009
Author: cmbarton
Date: 2009-09-24 15:46:36 -0400 (Thu, 24 Sep 2009)
New Revision: 39288
Modified:
grass/trunk/gui/wxpython/gui_modules/profile.py
Log:
backport profile bug fix from develbranch_6 r39257
Modified: grass/trunk/gui/wxpython/gui_modules/profile.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/profile.py 2009-09-24 04:57:29 UTC (rev 39287)
+++ grass/trunk/gui/wxpython/gui_modules/profile.py 2009-09-24 19:46:36 UTC (rev 39288)
@@ -703,16 +703,11 @@
Calls OptDialog class.
"""
dlg = OptDialog(parent=self, id=wx.ID_ANY, title=_('Profile settings'))
+ btnval = dlg.ShowModal()
- if dlg.ShowModal() == wx.ID_OK:
- dlg.UpdateSettings()
+ if btnval == wx.ID_SAVE or btnval == wx.ID_CANCEL:
+ dlg.Destroy()
- self.SetGraphStyle()
- if self.profile:
- self.DrawPlot()
-
- dlg.Destroy()
-
def PrintMenu(self, event):
"""
Print options and output menu
@@ -1423,13 +1418,18 @@
fileSettings['profile'] = UserSettings.Get(group='profile')
file = UserSettings.SaveToFile(fileSettings)
self.parent.parent.GetLayerManager().goutput.WriteLog(_('Profile settings saved to file \'%s\'.') % file)
+ self.parent.SetGraphStyle()
+ if self.parent.profile:
+ self.parent.DrawPlot()
self.Close()
def OnApply(self, event):
- """!Button 'Apply' pressed"""
+ """!Button 'Apply' pressed. Does not close dialog"""
self.UpdateSettings()
- self.Close()
-
+ self.parent.SetGraphStyle()
+ if self.parent.profile:
+ self.parent.DrawPlot()
+
def OnCancel(self, event):
"""!Button 'Cancel' pressed"""
self.Close()
More information about the grass-commit
mailing list