[commit] r2042 - trunk/GME/ObjectInspector

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Wed Sep 5 16:31:12 CDT 2012


Author: ksmyth
Date: Wed Sep  5 16:31:12 2012
New Revision: 2042

Log:
Fix GME-406: if one end of a connection is set, display the other in Object Inspector

Modified:
   trunk/GME/ObjectInspector/Property.cpp

Modified: trunk/GME/ObjectInspector/Property.cpp
==============================================================================
--- trunk/GME/ObjectInspector/Property.cpp	Wed Sep  5 16:31:00 2012	(r2041)
+++ trunk/GME/ObjectInspector/Property.cpp	Wed Sep  5 16:31:12 2012	(r2042)
@@ -673,27 +673,28 @@
 		// Querying source side information - strSource
 		COMTHROW( ccpMgaSimpleConn->get_Src(&ccpTempFCO) );
 		ASSERT(ccpTempFCO != NULL);
-		if( !ccpTempFCO) 
-			continue;
-		COMTHROW( ccpTempFCO->get_Name(&bstrTemp) );
-
-		objtype_enum oeParentObjType;
 		CComPtr<IMgaObject> ccpParentSrc;
-		COMTHROW( ccpTempFCO->GetParent(&ccpParentSrc, &oeParentObjType) );
+		if (ccpTempFCO) 
+		{
+			COMTHROW( ccpTempFCO->get_Name(&bstrTemp) );
 
-		ASSERT( ccpParentSrc != NULL );
-		CString strSrcName=bstrTemp;
+			objtype_enum oeParentObjType;
+			COMTHROW( ccpTempFCO->GetParent(&ccpParentSrc, &oeParentObjType) );
+
+			ASSERT( ccpParentSrc != NULL );
+			CString strSrcName=bstrTemp;
 	
-		// Setting dirty
-		if(bIsFirst)
-		{
-			strSource=strSrcName;
-		}
-		else
-		{
-			if(strSource!=strSrcName)
+			// Setting dirty
+			if(bIsFirst)
+			{
+				strSource=strSrcName;
+			}
+			else
 			{
-				bIsSourceDirty=true;
+				if(strSource!=strSrcName)
+				{
+					bIsSourceDirty=true;
+				}
 			}
 		}
 		
@@ -703,54 +704,56 @@
 		// Querying destination side information - strDest
 		COMTHROW( ccpMgaSimpleConn->get_Dst(&ccpTempFCO) );
 		ASSERT(ccpTempFCO != NULL);
-		if( !ccpTempFCO) 
-			continue;
-
-		COMTHROW( ccpTempFCO->get_Name(&bstrTemp) );
-
 		CComPtr<IMgaObject> ccpParentDst;
-		COMTHROW( ccpTempFCO->GetParent(&ccpParentDst, &oeParentObjType) );
+		if(ccpTempFCO)
+		{
+			COMTHROW( ccpTempFCO->get_Name(&bstrTemp) );
 
-		ASSERT( ccpParentDst != NULL );
-		CString strDstName=bstrTemp;
+			objtype_enum oeParentObjType;
+			COMTHROW( ccpTempFCO->GetParent(&ccpParentDst, &oeParentObjType) );
 
-		// Setting dirty
-		if(bIsFirst)
-		{
-			strDest=strDstName;
-		}
-		else
-		{
-			if(strDest!=strDstName)
+			ASSERT( ccpParentDst != NULL );
+			CString strDstName=bstrTemp;
+
+			// Setting dirty
+			if(bIsFirst)
 			{
-				bIsDestDirty=true;
+				strDest=strDstName;
+			}
+			else
+			{
+				if(strDest!=strDstName)
+				{
+					bIsDestDirty=true;
+				}
 			}
 		}
 
 		bstrTemp.Empty();
 		ccpTempFCO = NULL;
 
-		VARIANT_BOOL vtbIsParentsEqual=VARIANT_FALSE;
-  		COMTHROW( ccpParentSrc->get_IsEqual(ccpParentDst, &vtbIsParentsEqual) );
-
-		CString strSrcPortName;
-		CString strDstPortName;
-		if (vtbIsParentsEqual != VARIANT_FALSE)  // If parents are equal
-		{
+		CString strSrcPortName = _T("-");
+		CString strDstPortName = _T("-");
 
-			strSrcPortName =_T("-");
-			strDstPortName =_T("-");
-		} 
-		else 
+		if (ccpParentSrc && ccpParentDst)
 		{
+			VARIANT_BOOL vtbIsParentsEqual=VARIANT_FALSE;
+  			COMTHROW( ccpParentSrc->get_IsEqual(ccpParentDst, &vtbIsParentsEqual) );
 
-			bstrTemp.Empty();
-			COMTHROW( ccpParentSrc->get_Name(&bstrTemp) );
-			strSrcPortName = bstrTemp;
+			if (vtbIsParentsEqual != VARIANT_FALSE)  // If parents are equal
+			{
+			} 
+			else 
+			{
 
-			bstrTemp.Empty();
-			COMTHROW( ccpParentDst->get_Name(&bstrTemp) );
-			strDstPortName = bstrTemp;
+				bstrTemp.Empty();
+				COMTHROW( ccpParentSrc->get_Name(&bstrTemp) );
+				strSrcPortName = bstrTemp;
+
+				bstrTemp.Empty();
+				COMTHROW( ccpParentDst->get_Name(&bstrTemp) );
+				strDstPortName = bstrTemp;
+			}
 		}
 
 		// Setting dirty


More information about the gme-commit mailing list