public GroupView AddGroupView(GroupPanel _group) { var groupView = new GroupView(); groupView.SetUp(_group, CommandDispatcher, this); GroupViews[_group] = groupView; AddElement(groupView); AddSelectionsToGroup(groupView); return(groupView); }
public void AddSelectionsToGroup(GroupView _groupView) { foreach (var selectedNode in selection) { if (selectedNode is BaseNodeView) { if (_groupView.ContainsElement(selectedNode as GraphElement)) { continue; } _groupView.AddElement(selectedNode as BaseNodeView); } } }