Make sure we keep the same item selected in builtinview\display.py refresh()
This commit is contained in:
@@ -112,6 +112,12 @@ class Display(wx.ListCtrl):
|
||||
if stuff == None:
|
||||
return
|
||||
|
||||
selection = []
|
||||
sel = self.GetFirstSelected()
|
||||
while sel != -1:
|
||||
selection.append(sel)
|
||||
sel = self.GetNextSelected(sel)
|
||||
|
||||
self.Freeze()
|
||||
item = -1
|
||||
for id, st in enumerate(stuff):
|
||||
@@ -138,6 +144,8 @@ class Display(wx.ListCtrl):
|
||||
if self.GetColumnWidth(i) < 40 and col.size == wx.LIST_AUTOSIZE:
|
||||
self.SetColumnWidth(i, 40)
|
||||
|
||||
for sel in selection:
|
||||
self.Select(sel)
|
||||
self.Thaw()
|
||||
|
||||
def getColumn(self, point):
|
||||
|
||||
Reference in New Issue
Block a user