Browse Source

wxGUI:dbmgr: select item automatically when WHERE statement is given

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@62331 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 10 năm trước cách đây
mục cha
commit
b6f2ada5f8
1 tập tin đã thay đổi với 9 bổ sung1 xóa
  1. 9 1
      gui/wxpython/dbmgr/base.py

+ 9 - 1
gui/wxpython/dbmgr/base.py

@@ -253,7 +253,7 @@ class VirtualAttributeList(wx.ListCtrl,
                 return
 
             self.AddDataRow(i, record, columns, keyId)
-
+            
             i += 1
             if i >= 100000:
                 self.log.write(_("Viewing limit: 100000 records."))
@@ -261,6 +261,14 @@ class VirtualAttributeList(wx.ListCtrl,
         
         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