From 51d5f0976b30a925720e1da8a9317e3ed34b6769 Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Sat, 13 Nov 2010 23:28:44 +0200 Subject: [PATCH] Do select a bitmap into a memdc --- miniframe.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/miniframe.py b/miniframe.py index 0cebadcc4..c87a4e44b 100755 --- a/miniframe.py +++ b/miniframe.py @@ -75,10 +75,13 @@ class PFTabRenderer: return self.CopyRegion(self.closeBtnRegion) def GetMinSize(self): + ebmp = wx.EmptyBitmap(1,1) mdc = wx.MemoryDC() + mdc.SelectObject(ebmp) mdc.SetFont(self.font) textSizeX, textSizeY = mdc.GetTextExtent(self.text) totalSize = self.lrZoneWidth * 2 + textSizeX + self.cbSize*2 if self.closeButton else 0 + mdc.SelectObject(wx.NullBitmap) return (totalSize, self.tabHeight)