From d99aef0858d2ed29f4620bff001ce5781c98d40d Mon Sep 17 00:00:00 2001 From: chriskiehl Date: Sat, 3 Oct 2015 14:38:01 -0400 Subject: [PATCH] Prevent child program from executing on window level close --- gooey/gui/windows/base_window.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gooey/gui/windows/base_window.py b/gooey/gui/windows/base_window.py index 51a8644..de41592 100644 --- a/gooey/gui/windows/base_window.py +++ b/gooey/gui/windows/base_window.py @@ -41,6 +41,8 @@ class BaseWindow(wx.Frame): self.registerControllers() self.Bind(wx.EVT_SIZE, self.onResize) + self.Bind(wx.EVT_CLOSE, lambda x: pub.send_message(str(events.WINDOW_CLOSE))) + def _init_properties(self): self.SetTitle(self.build_spec['program_name']) self.SetSize(self.build_spec['default_size'])