Deselect items by default if marketBrowser itemView is repopulated
This commit is contained in:
@@ -167,16 +167,13 @@ class Display(wx.ListCtrl):
|
||||
|
||||
return lastFound
|
||||
|
||||
def deselectItems(self):
|
||||
sel = self.GetFirstSelected()
|
||||
while sel != -1:
|
||||
self.SetItemState(sel, 0, wx.LIST_STATE_SELECTED | wx.LIST_STATE_FOCUSED)
|
||||
sel = self.GetNextSelected(sel)
|
||||
|
||||
def populate(self, stuff):
|
||||
selection = []
|
||||
|
||||
|
||||
# sel = self.GetFirstSelected()
|
||||
# while sel != -1:
|
||||
# selection.append(sel)
|
||||
# sel = self.GetNextSelected(sel)
|
||||
|
||||
# self.DeleteAllItems()
|
||||
|
||||
if stuff is not None:
|
||||
listItemCount = self.GetItemCount()
|
||||
@@ -197,10 +194,6 @@ class Display(wx.ListCtrl):
|
||||
self.Refresh()
|
||||
|
||||
|
||||
|
||||
# for sel in selection:
|
||||
# self.Select(sel)
|
||||
|
||||
def refresh(self, stuff):
|
||||
if stuff == None:
|
||||
return
|
||||
|
||||
@@ -332,6 +332,7 @@ class ItemView(d.Display):
|
||||
return (item.metaGroup.parent.name, item.metaGroup.ID , item.name)
|
||||
|
||||
def populate(self, stuff):
|
||||
self.deselectItems()
|
||||
stuff.sort(key=self.itemSort)
|
||||
self.active = stuff
|
||||
d.Display.populate(self, stuff)
|
||||
|
||||
Reference in New Issue
Block a user