浏览代码

Fix bug that throws bogus error message to console if you try to change the name of a previously selected GIS element using the tree combobox.

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@35393 15284696-431f-4ddb-bdfa-cd5b030d7da7
Michael Barton 16 年之前
父节点
当前提交
51e9c6525a
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      gui/wxpython/gui_modules/gselect.py

+ 5 - 2
gui/wxpython/gui_modules/gselect.py

@@ -125,8 +125,11 @@ class TreeCtrlComboPopup(wx.combo.ComboPopup):
             if not root:
                 return
             item = self.FindItem(root, self.value[0])
-            self.seltree.EnsureVisible(item)
-            self.seltree.SelectItem(item)
+            try:
+                self.seltree.EnsureVisible(item)
+                self.seltree.SelectItem(item)
+            except:
+                pass
             
     def SetStringValue(self, value):
         # this assumes that item strings are unique...