浏览代码

wxGUI/vnet: fix failure on Windows

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@58639 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 11 年之前
父节点
当前提交
319d3cebe6
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      gui/wxpython/vnet/widgets.py

+ 2 - 1
gui/wxpython/vnet/widgets.py

@@ -244,7 +244,8 @@ class PointsList(wx.ListCtrl,
         self.itemDataMap[key][colNum] = cellVal
         index = self._findIndex(key)
 
-        self.SetStringItem(index, colNum, str(cellVal))
+        if index != -1:
+            self.SetStringItem(index, colNum, str(cellVal))
 
     def _findIndex(self, key):
         """!Find index for key"""