[GRASS-SVN] r66951 - grass/trunk/gui/wxpython/modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Nov 27 16:14:07 PST 2015
Author: martinl
Date: 2015-11-27 16:14:07 -0800 (Fri, 27 Nov 2015)
New Revision: 66951
Modified:
grass/trunk/gui/wxpython/modules/colorrules.py
Log:
wxGUI/colortable: fix saving color table to fi
Modified: grass/trunk/gui/wxpython/modules/colorrules.py
===================================================================
--- grass/trunk/gui/wxpython/modules/colorrules.py 2015-11-28 00:01:07 UTC (rev 66950)
+++ grass/trunk/gui/wxpython/modules/colorrules.py 2015-11-28 00:14:07 UTC (rev 66951)
@@ -12,7 +12,7 @@
- colorrules::ThematicVectorTable
- colorrules::BufferedWindow
-(C) 2008, 2010-2012 by the GRASS Development Team
+(C) 2008-2015 by the GRASS Development Team
This program is free software under the GNU General Public License
(>=v2). Read the file COPYING that comes with GRASS for details.
@@ -599,9 +599,18 @@
def OnSaveRulesFile(self, event):
"""Save color table to file"""
path = event.GetString()
- if not os.path.exists(path):
+ if not path:
return
+ if os.path.exists(path):
+ dlgOw = wx.MessageDialog(parent,
+ message = _("File <%s> already already exists. "
+ "Do you want to overwrite it?") % path,
+ caption = _("Overwrite?"),
+ style = wx.YES_NO | wx.YES_DEFAULT | wx.ICON_QUESTION)
+ if dlgOw.ShowModal() != wx.ID_YES:
+ return
+
rulestxt = ''
for rule in self.rulesPanel.ruleslines.itervalues():
if 'value' not in rule:
More information about the grass-commit
mailing list