[commit] r2067 - trunk/GME/Gme
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Wed Sep 26 09:55:18 CDT 2012
Author: ksmyth
Date: Wed Sep 26 09:55:18 2012
New Revision: 2067
Log:
Dont save project if xme import fails
Modified:
trunk/GME/Gme/GMEApp.cpp
trunk/GME/Gme/GMEApp.h
Modified: trunk/GME/Gme/GMEApp.cpp
==============================================================================
--- trunk/GME/Gme/GMEApp.cpp Wed Sep 26 09:55:07 2012 (r2066)
+++ trunk/GME/Gme/GMEApp.cpp Wed Sep 26 09:55:18 2012 (r2067)
@@ -667,7 +667,7 @@
// CGMEApp MGA project management
-void CGMEApp::CloseProject(bool updateStatusBar)
+void CGMEApp::CloseProject(bool updateStatusBar, bool force_abort)
{
CWaitCursor wait;
@@ -706,8 +706,8 @@
if( mgaProject != NULL ) {
mgaClient = NULL;
- if(mgaProject->Close(abort_on_close ? VARIANT_TRUE : VARIANT_FALSE) != S_OK) {
- AfxMessageBox(CString(_T("Error occurred ")) + (abort_on_close ? _T("aborting") : _T("closing")) + _T(" the project"));
+ if(mgaProject->Close((abort_on_close || force_abort) ? VARIANT_TRUE : VARIANT_FALSE) != S_OK) {
+ AfxMessageBox(CString(_T("Error occurred ")) + ((abort_on_close || force_abort) ? _T("aborting") : _T("closing")) + _T(" the project"));
}
mgaProject.Release();
}
@@ -1515,7 +1515,7 @@
}
AfterOpenOrCreateProject(conn);
}
- MSGCATCH(_T("Could not open project"), CloseProject())
+ MSGCATCH(_T("Could not open project"), CloseProject(true, true))
UpdateProjectName();
Modified: trunk/GME/Gme/GMEApp.h
==============================================================================
--- trunk/GME/Gme/GMEApp.h Wed Sep 26 09:55:07 2012 (r2066)
+++ trunk/GME/Gme/GMEApp.h Wed Sep 26 09:55:18 2012 (r2067)
@@ -146,7 +146,7 @@
void ImportDroppedFile(const CString& fname);
void RegisterDroppedFile( const CString& fname, bool userReg = true);
bool SafeCloseProject();
- void CloseProject(bool updateStatusBar = true);
+ void CloseProject(bool updateStatusBar = true, bool force_abort=false);
void OpenProject(const CString &conn);
void Importxml(CString fullPath, CString fname, CString ftitle);
void SaveProject(const CString &conn);
More information about the gme-commit
mailing list