[GRASS-SVN] r39257 -
grass/branches/develbranch_6/gui/wxpython/gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Sep 19 19:44:12 EDT 2009
Author: cmbarton
Date: 2009-09-19 19:44:10 -0400 (Sat, 19 Sep 2009)
New Revision: 39257
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/profile.py
Log:
Bug fix. Changing profile settings now update and change visible profile.
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/profile.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/profile.py 2009-09-19 21:06:57 UTC (rev 39256)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/profile.py 2009-09-19 23:44:10 UTC (rev 39257)
@@ -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