public void Group(IToolContext context) { lock (context.Renderer.Selected) { this.DeHover(context); var shapes = context.Renderer.Selected.ToList(); Delete(context); var group = new GroupShape(); foreach (var shape in shapes) { if (!(shape is PointShape)) { group.Shapes.Add(shape); } } group.Select(context.Renderer); context.CurrentContainer.Shapes.Add(group); context.Invalidate?.Invoke(); this.CurrentState = State.None; } }