Revert "Add doubleBuffering to Displays to eliminate flicker"

This reverts commit 475aab1a4d.
Do not use SetDoubleBuffered with wxpython 2.8.11.0 - it's bugged to hell.
This commit is contained in:
HomeWorld
2010-11-24 12:19:02 +02:00
parent 3b6fed377b
commit 73fc505d3e

View File

@@ -23,11 +23,9 @@ from gui.viewColumn import ViewColumn
import sys
class Display(wx.ListCtrl):
def __init__(self, parent, size = wx.DefaultSize, style = 0, doubleBuffered = True):
def __init__(self, parent, size = wx.DefaultSize, style = 0):
wx.ListCtrl.__init__(self, parent,size = size, style=wx.LC_REPORT | ( style | wx.BORDER_NONE if not (style & wx.SIMPLE_BORDER) else style) )
self.SetDoubleBuffered(doubleBuffered)
self.imageList = wx.ImageList(16, 16)
self.SetImageList(self.imageList, wx.IMAGE_LIST_SMALL)
self.activeColumns = []
@@ -139,7 +137,6 @@ class Display(wx.ListCtrl):
if stuff == None:
return
self.Freeze()
selection = []
sel = self.GetFirstSelected()
while sel != -1:
@@ -165,9 +162,12 @@ class Display(wx.ListCtrl):
if oldText != newText or oldImageId != newImageId:
self.SetItem(colItem)
self.SetItemState(item, 0 , wx.LIST_STATE_FOCUSED | wx.LIST_STATE_SELECTED)
self.SetItemData(item, id)
self.SetItemState(item, 0 , wx.LIST_STATE_FOCUSED | wx.LIST_STATE_SELECTED)
self.SetItemData(item, id)
self.Freeze()
if 'wxMSW' in wx.PlatformInfo:
for i,col in enumerate(self.activeColumns):
if not col.resized: