[commit] r2324 - trunk/GME/CSGUI

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Fri Aug 30 16:20:14 CDT 2013


Author: ksmyth
Date: Fri Aug 30 16:20:14 2013
New Revision: 2324

Log:
Allow redirection of references with refports to other references

Modified:
   trunk/GME/CSGUI/ReferenceSwitcher.cs

Modified: trunk/GME/CSGUI/ReferenceSwitcher.cs
==============================================================================
--- trunk/GME/CSGUI/ReferenceSwitcher.cs	Fri Aug 30 10:09:00 2013	(r2323)
+++ trunk/GME/CSGUI/ReferenceSwitcher.cs	Fri Aug 30 16:20:14 2013	(r2324)
@@ -213,7 +213,12 @@
         {
             Queue<IMgaReference> references = new Queue<IMgaReference>();
             references.Enqueue(origref);
-            MgaFCOs fco2ChildFCOs = (fco2 as IMgaModel).ChildFCOs;
+            IMgaFCO targetModel = fco2;
+            while (targetModel is IMgaReference)
+            {
+                targetModel = ((IMgaReference)targetModel).Referred;
+            }
+            MgaFCOs fco2ChildFCOs = ((IMgaModel)targetModel).ChildFCOs;
             Dictionary<string, IMgaFCO> newRefeChildren = GetNameMap(fco2ChildFCOs,
                 x => { });
             // TODO: warn, but only for refport-connected children


More information about the gme-commit mailing list