Editor: Handle document closing
When the user is trying to close the last view of a document, do the following:
- If the document is not saved, warn the user and give him an option to save.
- If there are still operations running on this document, warn the user and give him the option to either wait or abort the operations (plus canceling closing the document).
Note: Operations (including save) are potentially asynchronous. You can not expect them to finish after returning from the respective function (e.g. save) nor can you expect them to abort immediately on calling abort. Instead you should wait for the state change, which is broadcasted through the updateDocumentState function of the View class.
(RM-473 from redmine: created on 2012-11-25 by Marc Zinnschlag, , closed on 2013-03-12 by Joel Graff)
Edited by redmine