[commit] r1556 - trunk/GME/Gme
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Wed Sep 21 09:03:12 CDT 2011
Author: ksmyth
Date: Wed Sep 21 09:03:12 2011
New Revision: 1556
Log:
Fix bug where TerminateProcess was called before saving pane positions
Modified:
trunk/GME/Gme/GMEApp.cpp
trunk/GME/Gme/MainFrm.cpp
Modified: trunk/GME/Gme/GMEApp.cpp
==============================================================================
--- trunk/GME/Gme/GMEApp.cpp Wed Sep 21 09:03:01 2011 (r1555)
+++ trunk/GME/Gme/GMEApp.cpp Wed Sep 21 09:03:12 2011 (r1556)
@@ -1752,27 +1752,17 @@
void CGMEApp::OnAppExit()
{
- // Focus must be killed to flush ObjectInspector and Browser
- ::SetFocus(NULL);
-#ifdef _DEBUG
if (SaveAllModified())
{
CWinAppEx::OnAppExit();
return;
}
-#else
- if (SaveAllModified())
- {
- // n.b. C# interpreters may not Release() IGMEOLEApp, which keeps us ::Run()ing forever
- // TerminateProcess will be unpleasant for DCOM (but the user asked for it)
- TerminateProcess(GetCurrentProcess(), 0);
- }
- // n.b. don't call CWinAppEx::OnAppExit
-#endif
}
BOOL CGMEApp::SaveAllModified()
{
+ // Focus must be killed to flush ObjectInspector and Browser
+ ::SetFocus(NULL);
if (mgaProject != NULL && (proj_type_is_mga || proj_type_is_xmlbackend)) {
int ret = IDNO;
long l;
Modified: trunk/GME/Gme/MainFrm.cpp
==============================================================================
--- trunk/GME/Gme/MainFrm.cpp Wed Sep 21 09:03:01 2011 (r1555)
+++ trunk/GME/Gme/MainFrm.cpp Wed Sep 21 09:03:12 2011 (r1556)
@@ -224,15 +224,19 @@
void CMainFrame::OnClose()
{
-#ifdef _DEBUG
if (theApp.SaveAllModified())
{
+#ifdef _DEBUG
clearGmeOleApp();
CMDIFrameWndEx::OnClose();
- }
#else
- theApp.OnAppExit();
+ // n.b. this saves pane positions
+ CMDIFrameWndEx::OnClose();
+ // n.b. C# interpreters may not Release() IGMEOLEApp, which keeps us ::Run()ing forever
+ // TerminateProcess will be unpleasant for DCOM (but the user asked for it)
+ TerminateProcess(GetCurrentProcess(), 0);
#endif
+ }
}
int CMainFrame::CreateToolBars()
More information about the gme-commit
mailing list