Example #1
0
        protected override void AddEditingAdornerSetCreatorsForSelectedElement(IList <IAdornerSetCreator> adornerSetCreators, SceneElement element)
        {
            ViewState viewState = ViewState.ElementValid | ViewState.AncestorValid | ViewState.SubtreeValid;

            if ((this.ActiveView.GetViewState((SceneNode)element) & viewState) == viewState)
            {
                if (element is BaseFrameworkElement)
                {
                    using (IEnumerator <IAdornerSetCreator> enumerator = SubselectionTool.SubselectionAdornerSetCreators.GetEnumerator())
                    {
                        while (enumerator.MoveNext())
                        {
                            IAdornerSetCreator current = enumerator.Current;
                            adornerSetCreators.Add(current);
                        }
                        return;
                    }
                }
                else if (element is Base3DElement)
                {
                    if (this.ActiveSceneViewModel.ElementSelectionSet.Count == 1)
                    {
                        foreach (IAdornerSetCreator adornerSetCreator in (IEnumerable <IAdornerSetCreator>)SubselectionTool.SubselectionAdornerSetCreators3D)
                        {
                            adornerSetCreators.Add(adornerSetCreator);
                        }
                    }
                    if (!(element is LightElement))
                    {
                        return;
                    }
                    Tool.Add3DLightAdorners(adornerSetCreators, element, false);
                    return;
                }
            }
            base.AddEditingAdornerSetCreatorsForSelectedElement(adornerSetCreators, element);
        }