[GRASS-SVN] r62331 - grass/trunk/gui/wxpython/dbmgr

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Oct 21 13:33:32 PDT 2014


Author: martinl
Date: 2014-10-21 13:33:32 -0700 (Tue, 21 Oct 2014)
New Revision: 62331

Modified:
   grass/trunk/gui/wxpython/dbmgr/base.py
Log:
wxGUI:dbmgr: select item automatically when WHERE statement is given


Modified: grass/trunk/gui/wxpython/dbmgr/base.py
===================================================================
--- grass/trunk/gui/wxpython/dbmgr/base.py	2014-10-21 20:15:51 UTC (rev 62330)
+++ grass/trunk/gui/wxpython/dbmgr/base.py	2014-10-21 20:33:32 UTC (rev 62331)
@@ -253,7 +253,7 @@
                 return
 
             self.AddDataRow(i, record, columns, keyId)
-
+            
             i += 1
             if i >= 100000:
                 self.log.write(_("Viewing limit: 100000 records."))
@@ -261,6 +261,14 @@
         
         self.SetItemCount(i)
         
+        if where:
+            item = -1
+            while True:
+                item = self.GetNextItem(item)
+                if item == -1:
+                    break
+                self.SetItemState(item, wx.LIST_STATE_SELECTED, wx.LIST_STATE_SELECTED)
+        
         i = 0
         for col in columns:
             width = self.columns[col]['length'] * 6 # FIXME



More information about the grass-commit mailing list