private IEnumerable <Anatomy> currentClickGroupSelectionFor(SortedAnatomyClickResults matches) { if (showPremiumAnatomy) { Anatomy groupSelection = null; AnatomyGroup precursor; switch (PickingMode) { case AnatomyPickingMode.Group: //Start with group and go to individual try { groupSelection = currentTopLevelMode.buildGroupSelectionFor(matches.Closest); } catch (Exception) { } //Ignore any exceptions. if (groupSelection != null) { yield return(groupSelection); } if (matches.Closest.IndividualSelectionPrecursor != null && luceneSearch.tryGetGroup(matches.Closest.IndividualSelectionPrecursor, out precursor)) { yield return(precursor); } yield return(matches.Closest); break; case AnatomyPickingMode.Individual: //Go from individual to group yield return(matches.Closest); if (matches.Closest.IndividualSelectionPrecursor != null && luceneSearch.tryGetGroup(matches.Closest.IndividualSelectionPrecursor, out precursor)) { yield return(precursor); } try { groupSelection = currentTopLevelMode.buildGroupSelectionFor(matches.Closest); } catch (Exception) { } //Ignore any exceptions. if (groupSelection != null) { yield return(groupSelection); } break; } } else { AnatomyGroup groupSelection; luceneSearch.tryGetGroup(matches.Closest.Systems.FirstOrDefault(), out groupSelection); yield return(groupSelection); } }