[GRASS-SVN] r68400 - grass/trunk/gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Sat May 7 19:34:27 PDT 2016


Author: wenzeslaus
Date: 2016-05-07 19:34:27 -0700 (Sat, 07 May 2016)
New Revision: 68400

Modified:
   grass/trunk/gui/wxpython/gui_core/pyedit.py
Log:
pyedit:use modified to see we need to ask before replacing content

Modified: grass/trunk/gui/wxpython/gui_core/pyedit.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/pyedit.py	2016-05-08 02:23:50 UTC (rev 68399)
+++ grass/trunk/gui/wxpython/gui_core/pyedit.py	2016-05-08 02:34:27 UTC (rev 68400)
@@ -360,8 +360,6 @@
         else:
             self.SaveAs()
 
-    # TODO: it should be probably used with replacing, when this gives what we
-    # want?
     def IsModified(self):
         """Check if python script has been modified"""
         return self.body.modified
@@ -425,7 +423,7 @@
             message = _("Replace the current content by the file content?")
         else:
             message = by_message
-        if not self.IsEmpty():
+        if not self.IsEmpty() and self.IsModified():
             dlg = wx.MessageDialog(
                 parent=self.guiparent, message=message,
                 caption=_("Replace content"),



More information about the grass-commit mailing list