BUG: #1596616 Problem exiting with ESC key if /e param is given
https://sourceforge.net/tracker/index.php?func=detail&aid=1596616&group_id=13216&atid=113216
This is my attempt to clarify code for saving modified documents in all different situations. I tried many different approaches and this seems to be the cleanest and easiest.
Most important changes:
- use SaveModified() method in CMergeDoc to handle saving of modified documents. Remove saving code from CMainFrame and most other CMergeDoc methods.
- set buffers non-modified in actual saving code to minimize window for wrong values for ismodified() checks.
- Use PostMessage() in PreTranslateMessage() to better handle messages (SendMessage() waits message to be handled which can cause side-effects)
Original and altered files
Updated patch
Logged In: YES
user_id=631874
Originator: YES
Attaching updated patch. This version handles the situation where CMergeDoc::SaveModified() gets called twice. The static counter skips the second time and the dialog is only shown once.
Logged In: YES
user_id=631874
Originator: YES
Committed to SVN trunk.
Completed: At revision: 3808
Logged In: YES
user_id=631874
Originator: YES
Committed to 2.6 branch, with some trivial cleanups from trunk in the same files.
Completed: At revision: 3847
Logged In: NO
http://cc91571e918ea4d6bcbe0cd77eec2ead-t.qjhuma.org <a href="http://cc91571e918ea4d6bcbe0cd77eec2ead-h.qjhuma.org">cc91571e918ea4d6bcbe0cd77eec2ead</a> [url]http://cc91571e918ea4d6bcbe0cd77eec2ead-b1.qjhuma.org[/url] [url=http://cc91571e918ea4d6bcbe0cd77eec2ead-b2.qjhuma.org]cc91571e918ea4d6bcbe0cd77eec2ead[/url] [u]http://cc91571e918ea4d6bcbe0cd77eec2ead-b3.qjhuma.org[/u] 5da269d70f258be2341c2332392a1020