diff options
author | Scott Talbert <swt@techie.net> | 2015-01-29 19:31:47 -0500 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2015-01-30 08:45:22 -0800 |
commit | 80ee28e1490fa1aa7cac6e21506c2890ead9affd (patch) | |
tree | 495509ad4fd17d3fc78a366ce8ca7f021a611199 /gr-wxgui/python | |
parent | a41a7824a8da6f7f4b9bf16f2f253da56c7dc3c9 (diff) |
Fix gnuradio for wxPython3/GTK+3
MemoryDC needs to have a bitmap selected before using it
Diffstat (limited to 'gr-wxgui/python')
-rw-r--r-- | gr-wxgui/python/wxgui/plotter/gltext.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gr-wxgui/python/wxgui/plotter/gltext.py b/gr-wxgui/python/wxgui/plotter/gltext.py index 0b6e3f55b3..55627bceb1 100644 --- a/gr-wxgui/python/wxgui/plotter/gltext.py +++ b/gr-wxgui/python/wxgui/plotter/gltext.py @@ -149,6 +149,10 @@ class TextElement(object): # get a memory dc dc = wx.MemoryDC() + # Select an empty bitmap into the MemoryDC - otherwise the call to + # GetMultiLineTextExtent() may fail below + dc.SelectObject(wx.EmptyBitmap(1,1)) + # set our font dc.SetFont(self._font) |