[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 01/01: Fix gnuradio for wxPython3/GTK+3
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 01/01: Fix gnuradio for wxPython3/GTK+3 |
Date: |
Fri, 30 Jan 2015 16:57:26 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch maint
in repository gnuradio.
commit 80ee28e1490fa1aa7cac6e21506c2890ead9affd
Author: Scott Talbert <address@hidden>
Date: Thu Jan 29 19:31:47 2015 -0500
Fix gnuradio for wxPython3/GTK+3
MemoryDC needs to have a bitmap selected before using it
---
gr-wxgui/python/wxgui/plotter/gltext.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gr-wxgui/python/wxgui/plotter/gltext.py
b/gr-wxgui/python/wxgui/plotter/gltext.py
index 0b6e3f5..55627bc 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)