[commit] r2425 - trunk/GME/Gme

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Wed Feb 12 10:47:31 CST 2014


Author: ksmyth
Date: Wed Feb 12 10:47:31 2014
New Revision: 2425

Log:
Model Editor: double-clicking port or refport now shows that port centered in its parent (META-2833)

Modified:
   trunk/GME/Gme/GMEView.cpp

Modified: trunk/GME/Gme/GMEView.cpp
==============================================================================
--- trunk/GME/Gme/GMEView.cpp	Wed Feb 12 10:47:17 2014	(r2424)
+++ trunk/GME/Gme/GMEView.cpp	Wed Feb 12 10:47:31 2014	(r2425)
@@ -5839,12 +5839,21 @@
 						aspectName = asp->name;
 				}
 			}
+			auto guiport = selection->FindPort(point);
+			CComPtr<IMgaFCO> port;
+			if (guiport)
+				port = guiport->mgaFco; // n.b. get the MgaFCO here, or double-clicking on refport fails (guiport is deleted?)
 			if(model != 0) {
 				ShowModel(model, aspectName);
 #if !defined (ACTIVEXGMEVIEW)
 				CGMEView *view = CGMEDoc::theInstance->FindView(model);
-				if(view)
-					view->SetCenterObject(referred);
+				if (view)
+				{
+					if (port)
+						view->SetCenterObject(port); // this may change the aspect. (does it matter?)
+					else
+						view->SetCenterObject(referred);
+				}
 #endif
 			}
 		}


More information about the gme-commit mailing list