[commit] r1657 - trunk/GME/ObjectInspector

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Wed Nov 2 16:22:42 CDT 2011


Author: ksmyth
Date: Wed Nov  2 16:22:42 2011
New Revision: 1657

Log:
Display "Library objects cannot be modified" when user tries to edit in Object Inspector

Modified:
   trunk/GME/ObjectInspector/ObjectInspectorCtl.cpp

Modified: trunk/GME/ObjectInspector/ObjectInspectorCtl.cpp
==============================================================================
--- trunk/GME/ObjectInspector/ObjectInspectorCtl.cpp	Wed Nov  2 16:22:31 2011	(r1656)
+++ trunk/GME/ObjectInspector/ObjectInspectorCtl.cpp	Wed Nov  2 16:22:42 2011	(r1657)
@@ -953,7 +953,7 @@
 
 		
 	}
-	catch (hresult_exception e)
+	catch (hresult_exception& e)
 	{
 		ASSERT(0);
 		m_project->AbortTransaction();
@@ -961,7 +961,10 @@
 		{
 			ccpMetaProject->AbortTransaction();
 		}
-		CWnd::MessageBox(_T("Object Inspector could not write object preference data due to an unexpected MGA error. We apoligize for the inconvenience."),_T("Object inspector"),MB_ICONERROR);
+		if (e.hr == E_MGA_LIBOBJECT)
+			CWnd::MessageBox(_T("Library objects cannot be modified."), _T("GME"), MB_ICONERROR);
+		else
+			CWnd::MessageBox(_T("GME could not write object preference data due to an unexpected MGA error. We apologize for the inconvenience."), _T("GME"), MB_ICONERROR);
 	}
 	
 }


More information about the gme-commit mailing list