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

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jul 18 06:54:01 PDT 2016


Author: annakrat
Date: 2016-07-18 06:54:01 -0700 (Mon, 18 Jul 2016)
New Revision: 68999

Modified:
   grass/trunk/gui/wxpython/gui_core/widgets.py
Log:
wxGUI: fix #3103 - sys.maxsize doesn't work in 64bit windows

Modified: grass/trunk/gui/wxpython/gui_core/widgets.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/widgets.py	2016-07-18 13:34:52 UTC (rev 68998)
+++ grass/trunk/gui/wxpython/gui_core/widgets.py	2016-07-18 13:54:01 UTC (rev 68999)
@@ -936,10 +936,6 @@
         self.Bind(wx.EVT_COMMAND_RIGHT_CLICK, self.OnPopupMenu)  # wxMSW
         self.Bind(wx.EVT_RIGHT_UP, self.OnPopupMenu)  # wxGTK
 
-    def LoadData(self):
-        """Load data into list"""
-        pass
-
     def OnPopupMenu(self, event):
         """Show popup menu"""
         if self.GetItemCount() < 1:
@@ -1020,10 +1016,12 @@
         if data is None:
             return
 
+        idx = 0
         for item in data:
-            index = self.InsertStringItem(sys.maxsize, str(item[0]))
+            index = self.InsertStringItem(idx, str(item[0]))
             for i in range(1, self.GetColumnCount()):
                 self.SetStringItem(index, i, item[i])
+            idx += 1
 
         # check by default only on one item
         if len(data) == 1 and selectOne:



More information about the grass-commit mailing list