From 7458a0580219311088360d470fe26b35d2f8171a Mon Sep 17 00:00:00 2001 From: cncfanatics Date: Sat, 4 Sep 2010 20:04:32 +0200 Subject: [PATCH] Don't create a dummy dc, instead call GetTextExtend on the pannel itself --- gui/statsPane.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gui/statsPane.py b/gui/statsPane.py index 3786b7edc..5e9e65723 100644 --- a/gui/statsPane.py +++ b/gui/statsPane.py @@ -41,10 +41,7 @@ class StatsPane(wx.Panel): self.mainFrame.statsSizer.Layout() def getTextExtentW(self, text): - tfont=self.GetFont() - mdc=wx.MemoryDC() - mdc.SetFont(tfont) - width, height = mdc.GetTextExtent( text ) + width, height = self.GetTextExtent( text ) return width def fitChanged(self, event):