[GRASS-SVN] r62825 - in grass/branches/releasebranch_7_0: . gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Nov 19 18:47:52 PST 2014


Author: annakrat
Date: 2014-11-19 18:47:52 -0800 (Wed, 19 Nov 2014)
New Revision: 62825

Modified:
   grass/branches/releasebranch_7_0/
   grass/branches/releasebranch_7_0/gui/wxpython/gui_core/forms.py
Log:
wxGUI: fix closing d.* dialog of a new layer which was removed (merge from trunk, r62824)


Property changes on: grass/branches/releasebranch_7_0
___________________________________________________________________
Modified: svn:mergeinfo
   - /grass/trunk:60817,61096,61141,62179-62180,62182,62403,62422,62424,62437,62466,62469,62487,62491,62494,62501,62506,62508-62509,62515,62518-62519,62521,62526,62533,62539,62541,62555,62562,62566,62570,62573,62575,62585,62588,62597,62603,62606,62608-62609,62614,62618,62628,62632,62638,62642,62648-62649,62652,62654-62657,62666,62691,62705,62709,62723,62730,62739,62741,62743,62746,62750,62752,62757,62762,62785,62798,62800-62801,62803,62805,62812,62822
   + /grass/trunk:60817,61096,61141,62179-62180,62182,62403,62422,62424,62437,62466,62469,62487,62491,62494,62501,62506,62508-62509,62515,62518-62519,62521,62526,62533,62539,62541,62555,62562,62566,62570,62573,62575,62585,62588,62597,62603,62606,62608-62609,62614,62618,62628,62632,62638,62642,62648-62649,62652,62654-62657,62666,62691,62705,62709,62723,62730,62739,62741,62743,62746,62750,62752,62757,62762,62785,62798,62800-62801,62803,62805,62812,62822,62824

Modified: grass/branches/releasebranch_7_0/gui/wxpython/gui_core/forms.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/gui_core/forms.py	2014-11-20 02:46:54 UTC (rev 62824)
+++ grass/branches/releasebranch_7_0/gui/wxpython/gui_core/forms.py	2014-11-20 02:47:52 UTC (rev 62825)
@@ -765,7 +765,11 @@
                 self.Hide()
             # canceled layer with nothing set
             elif len(self.parent.GetLayerInfo(self.layer, key = 'cmd')) < 1:
-                self.parent.Delete(self.layer)
+                try:
+                    self.parent.Delete(self.layer)
+                except ValueError:
+                    # happens when closing dialog of a new layer which was removed from tree
+                    pass
                 self.Destroy()
         else:
             # cancel for non-display commands



More information about the grass-commit mailing list