Change populate to not autorefresh. Only ever call populate if the

amount of slots in a fit changes or if the fit itself changes, call
refresh in all other cases
This commit is contained in:
cncfanatics
2010-09-15 17:44:23 +02:00
parent 32531728b0
commit bf6932b6cc
4 changed files with 23 additions and 29 deletions

View File

@@ -97,16 +97,6 @@ class Display(wx.ListCtrl):
if stuff is not None:
for id, st in enumerate(stuff):
index = self.InsertStringItem(sys.maxint, "")
for i, col in enumerate(self.activeColumns):
self.SetStringItem(index, i, col.getText(st), col.getImageId(st))
self.SetItemData(index, id)
for i, col in enumerate(self.activeColumns):
if not col.resized:
self.SetColumnWidth(i, col.size)
if self.GetColumnWidth(i) < 40 and col.size == wx.LIST_AUTOSIZE:
self.SetColumnWidth(i, 40)
for sel in selection:
self.Select(sel)
@@ -122,6 +112,12 @@ class Display(wx.ListCtrl):
self.SetStringItem(item, i, col.getText(st), col.getImageId(st))
self.SetItemData(item, id)
for i, col in enumerate(self.activeColumns):
if not col.resized:
self.SetColumnWidth(i, col.size)
if self.GetColumnWidth(i) < 40 and col.size == wx.LIST_AUTOSIZE:
self.SetColumnWidth(i, 40)
self.Thaw()
def getColumn(self, point):