From 73fc505d3e42415aa951a91affca35146e64ef5b Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Wed, 24 Nov 2010 12:19:02 +0200 Subject: [PATCH] Revert "Add doubleBuffering to Displays to eliminate flicker" This reverts commit 475aab1a4d87c12aa990f87f306d1a959ff5330a. Do not use SetDoubleBuffered with wxpython 2.8.11.0 - it's bugged to hell. --- gui/display.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gui/display.py b/gui/display.py index 2b73cedaf..356caaf40 100644 --- a/gui/display.py +++ b/gui/display.py @@ -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: