[commit] r1411 - trunk/GME/Gme

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Tue Jul 19 11:20:23 CDT 2011


Author: ksmyth
Date: Tue Jul 19 11:20:23 2011
New Revision: 1411

Log:
Make faulty GME-298 fixes less terrible. Shouldnt crash now, but File->Exit with mods only gives Save/Dont Save instead of Save/Dont Save/Cancel

Modified:
   trunk/GME/Gme/GMEApp.cpp
   trunk/GME/Gme/MainFrm.cpp
   trunk/GME/Gme/MainFrm.h

Modified: trunk/GME/Gme/GMEApp.cpp
==============================================================================
--- trunk/GME/Gme/GMEApp.cpp	Tue Jul 19 11:11:36 2011	(r1410)
+++ trunk/GME/Gme/GMEApp.cpp	Tue Jul 19 11:20:23 2011	(r1411)
@@ -1762,10 +1762,9 @@
 			OnFileAbortProject();
 		} else {
 			((CMainFrame*)m_pMainWnd)->clearMgaProj();
-			SafeCloseProject();
+			return SafeCloseProject();
 		}
 	}
-    ((CMainFrame*)m_pMainWnd)->clearGmeOleApp();
 	return TRUE;
 }
 

Modified: trunk/GME/Gme/MainFrm.cpp
==============================================================================
--- trunk/GME/Gme/MainFrm.cpp	Tue Jul 19 11:11:36 2011	(r1410)
+++ trunk/GME/Gme/MainFrm.cpp	Tue Jul 19 11:20:23 2011	(r1411)
@@ -104,6 +104,7 @@
 	MSG_MAP_VIEW_PANE(ID_VIEW_CONSOLE,			CGMEConsole,		m_console)
 	MSG_MAP_VIEW_PANE(ID_VIEW_GMEBROWSER,		CGMEBrowser,		m_browser)
 	MSG_MAP_VIEW_PANE(ID_VIEW_SEARCH,			CGMESearch,			m_search)
+	ON_WM_CLOSE()
 	ON_WM_DROPFILES()
 	ON_UPDATE_COMMAND_UI_RANGE(ID_VIEW_APPLOOK_WIN_2000, ID_VIEW_APPLOOK_OFF_2007_AQUA, &CMainFrame::OnUpdateApplicationLook)
 	ON_COMMAND(ID_WINDOW_MANAGER, &CMainFrame::OnWindowManager)
@@ -219,6 +220,13 @@
 	m_console.SetGMEProj( 0 );
 }
 
+
+void CMainFrame::OnClose()
+{
+	clearGmeOleApp();
+	CMDIFrameWndEx::OnClose();
+}
+
 int CMainFrame::CreateToolBars()
 {
 	
@@ -909,6 +917,11 @@
     return TRUE;
 }
 
+BOOL CMainFrame::DestroyWindow()
+{
+	return CMDIFrameWndEx::DestroyWindow();
+}
+
 void CMainFrame::ShowObjectInspector()
 {
 	ShowPane(&m_objectInspector, TRUE, FALSE, TRUE);

Modified: trunk/GME/Gme/MainFrm.h
==============================================================================
--- trunk/GME/Gme/MainFrm.h	Tue Jul 19 11:11:36 2011	(r1410)
+++ trunk/GME/Gme/MainFrm.h	Tue Jul 19 11:20:23 2011	(r1411)
@@ -74,6 +74,7 @@
 	//{{AFX_VIRTUAL(CMainFrame)
 	public:
 	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
+	virtual BOOL DestroyWindow();
 	virtual BOOL PreTranslateMessage(MSG* pMsg);
 	//}}AFX_VIRTUAL
 
@@ -146,6 +147,7 @@
 	}
 
 	afx_msg void OnUpdateWindowNew(CCmdUI* pCmdUI);
+	afx_msg void OnClose();
 public:
 	afx_msg void OnDropFiles(HDROP p_hDropInfo);
 protected:


More information about the gme-commit mailing list