fix so all handlers get called on event
authorJosh Blum <josh@joshknows.com>
Tue, 13 Oct 2009 01:35:10 +0000 (18:35 -0700)
committerJosh Blum <josh@joshknows.com>
Wed, 14 Oct 2009 18:36:03 +0000 (11:36 -0700)
gr-wxgui/src/python/common.py

index fa11b3152fd358bc005226697faebe6857d05fbd..a75f6810d8ce0732a7d9984ba8076ffd5566edd9 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright 2008 Free Software Foundation, Inc.
+# Copyright 2008, 2009 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -89,7 +89,10 @@ class wxgui_hb(object):
                                my_win = parent
                #call the handler, the arg is shown or not
                def handler_factory(my_win, my_handler):
-                       return lambda *args: my_handler(is_wx_window_visible(my_win))
+                       def callback(evt):
+                               my_handler(is_wx_window_visible(my_win))
+                               evt.Skip() #skip so all bound handlers are called
+                       return callback
                handler = handler_factory(win, handler)
                #bind the handler to all the parent notebooks
                win.Bind(wx.EVT_UPDATE_UI, handler)