예제 #1
0
 public override void DeleteSelected(EditorSceneBase scene, DeletionManager manager, IList list)
 {
     if (Selected)
     {
         manager.Add(list, this);
     }
 }
예제 #2
0
        public override void DeleteSelected(EditorSceneBase scene, DeletionManager manager, IList list)
        {
            List <RenderablePathPoint> points = new List <RenderablePathPoint>();

            foreach (RenderablePathPoint point in PathPoints)
            {
                if (point.IsSelected())
                {
                    points.Add(point);
                }
            }

            scene.AddToUndo(new RevertableDelPointCollection(points));

            bool allPointsSelected = true;

            foreach (RenderablePathPoint point in PathPoints)
            {
                allPointsSelected &= point.IsSelected();
            }

            foreach (RenderablePathPoint point in PathPoints)
            {
                BeforePointDeleted(point);
            }

            if (allPointsSelected)
            {
                scene.InvalidateList(PathPoints);
                manager.Add(list, this);
            }
            else
            {
                foreach (RenderablePathPoint point in PathPoints)
                {
                    point.DeleteSelected(scene, manager, PathPoints);
                }
            }
        }