Don't reclear and repopulate the whole fitting view whenever anything

changed. Only repopulate when needed, and just refresh the columns in
all other cases
This commit is contained in:
cncfanatics
2010-09-15 10:17:40 +02:00
parent 8b03e831ea
commit 35d9a42d70
2 changed files with 32 additions and 3 deletions

View File

@@ -85,7 +85,7 @@ class Display(wx.ListCtrl):
selection = []
self.Freeze()
sel = self.GetFirstSelected()
while sel != -1:
selection.append(sel)
@@ -113,6 +113,17 @@ class Display(wx.ListCtrl):
self.Thaw()
def refresh(self, stuff):
self.Freeze()
item = -1
for id, st in enumerate(stuff):
item = self.GetNextItem(item)
for i, col in enumerate(self.activeColumns):
self.SetStringItem(item, i, col.getText(st), col.getImageId(st))
self.SetItemData(item, id)
self.Thaw()
def getColumn(self, point):
x = point[0]
total = 0