Beispiel #1
0
        private static void UngroupGroups(CircuitEditingContext circuitEditingContext, ISelectionContext selectionContext)
        {
            var graphContainer = circuitEditingContext.CircuitContainer;
            var newSelection   = new List <object>();

            foreach (var group in selectionContext.Selection.AsIEnumerable <Group>())
            {
                newSelection.AddRange(group.Elements);
                UngroupGroup(group, graphContainer);
            }
            selectionContext.SetRange(newSelection);
        }
Beispiel #2
0
        private void CloseEditingContext(CircuitEditingContext editingContext)
        {
            m_contextRegistry.RemoveContext(editingContext);

            if (editingContext.Is <ViewingContext>())
            {
                var viewingContext = editingContext.Cast <ViewingContext>();

                if (viewingContext.Control != null)
                {
                    UnregisterControl(viewingContext.DomNode, viewingContext.Control);
                    viewingContext.Control = null;
                }
            }
        }