plotter: require double buffering
[debian/gnuradio] / gr-wxgui / src / python / waterfallsink2.py
index 21519304458e23718c603625349827b684d66d35..08e96105de1dc288ae0516d8cfd78678745a2ec6 100644 (file)
@@ -25,16 +25,12 @@ p = gr.prefs()
 style = p.get_string('wxgui', 'style', 'auto')
 
 # In 3.2 we'll change 'auto' to mean 'gl' if possible, then fallback
-if style == 'auto':
-    style = 'nongl'
+# Currently, anything other than 'gl' means 'nongl'
 
-if style == 'nongl':
-    from waterfallsink_nongl import waterfall_sink_f, waterfall_sink_c
-elif style == 'gl':
+if style == 'gl':
     try:
-        import wx
-        wx.glcanvas.GLCanvas
-    except AttributeError:
+        import wx.glcanvas
+    except ImportError:
         raise RuntimeError("wxPython doesn't support glcanvas")
 
     try:
@@ -43,3 +39,6 @@ elif style == 'gl':
         raise RuntimeError("Unable to import OpenGL. Are Python wrappers for OpenGL installed?")
 
     from waterfallsink_gl import waterfall_sink_f, waterfall_sink_c
+
+else:
+    from waterfallsink_nongl import waterfall_sink_f, waterfall_sink_c