summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvain Munaut <246tnt@gmail.com>2013-10-25 21:20:16 -0500
committerJohnathan Corgan <johnathan@corganlabs.com>2013-10-25 21:21:20 -0500
commita8a596eac925ea57fd83273df70bb6736abab998 (patch)
tree2d958378b7559d13218ebb885ab88fd95956e764
parente352bf44d73a59818c5fc5831f52092c28d17623 (diff)
wxgui: ensure flowgraph shutdown before app exit
Also updates qtgui
-rw-r--r--gr-wxgui/python/wxgui/stdgui2.py1
-rw-r--r--grc/python/flow_graph.tmpl5
2 files changed, 5 insertions, 1 deletions
diff --git a/gr-wxgui/python/wxgui/stdgui2.py b/gr-wxgui/python/wxgui/stdgui2.py
index b38589988e..d983dd58cd 100644
--- a/gr-wxgui/python/wxgui/stdgui2.py
+++ b/gr-wxgui/python/wxgui/stdgui2.py
@@ -79,6 +79,7 @@ class stdframe (wx.Frame):
def OnCloseWindow (self, event):
self.top_block().stop()
+ self.top_block().wait()
self.Destroy ()
def top_block (self):
diff --git a/grc/python/flow_graph.tmpl b/grc/python/flow_graph.tmpl
index 3e9520a14f..5daf80f685 100644
--- a/grc/python/flow_graph.tmpl
+++ b/grc/python/flow_graph.tmpl
@@ -322,11 +322,14 @@ if __name__ == '__main__':
#end if
#end if
tb.show()
+ def quitting():
+ tb.stop()
+ tb.wait()
+ qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting)
#for $m in $monitors
(tb.$m.get_id()).start()
#end for
qapp.exec_()
- tb.stop()
tb = None #to clean up Qt widgets
#elif $generate_options == 'no_gui'
tb = $(class_name)($(', '.join($params_eq_list)))