enthought / envisage

Envisage is a Python-based framework for building applications whose functionalities can be extended by adding "plug-ins".
http://docs.enthought.com/envisage/
Other
81 stars 26 forks source link

Fix TasksApplication lifecycle: don't stop plugins while event loop is running #524

Closed mdickinson closed 1 year ago

mdickinson commented 1 year ago

This PR fixes a long-standing bug in the TasksApplication where the plugins were stopped while the event loop was still running; that seems unlikely to be what any particular application wants, and we've had to work around it in downstream projects. I doubt that this was ever the intended behaviour.

For backwards compatibility, we keep the behaviour where closing the last Tasks windows causes the application to exit. (That behaviour is also worth discussing, but likely in a separate issue.)

Closes #221.

mdickinson commented 1 year ago

In terms of the exit on last window close behaviour

Indeed I think this needs rethinking - it's rather awkward that _on_window_closed is being called before the window is closed. But not in this PR.