Reputation: 16275
For some reason, my program fails to quit properly when my panel is closed when I add the following line:
dialogRename = wx.TextEntryDialog(None, message = 'Enter the name of the installation:', caption = 'Rename?', defaultValue = addedFilenameUser)
Even if I never ShowModal()
, the window closes and I get no errors, but the Python application on Mac OS stays running until I kill it, and "Terminated" is printed on the terminal.
Upvotes: 1
Views: 1139
Reputation: 423
Catch do close event from the main window and do this:
wxGetApp().ExitMainLoop()
The reason is that your dialog is hidden, not closed. wxWidgets only exit the application when all windows and dialogs are closed.
Upvotes: 3