public void DeleteObjects(IEnumerable <IDrawObject> objects) { EditCommandRemove undocommand = null; if (m_undoBuffer.CanCapture) { undocommand = new EditCommandRemove(); } foreach (ICanvasLayer layer in m_layers) { List <IDrawObject> removedobjects = ((DrawingLayer)layer).DeleteObjects(objects); if (removedobjects != null && undocommand != null) { undocommand.AddLayerObjects(layer, removedobjects); } } if (undocommand != null) { m_undoBuffer.AddCommand(undocommand); } }
public void DeleteObjects(IEnumerable<IDrawObject> objects) { EditCommandRemove undocommand = null; if (m_undoBuffer.CanCapture) undocommand = new EditCommandRemove(); foreach (ICanvasLayer layer in m_layers) { List<IDrawObject> removedobjects = ((DrawingLayer)layer).DeleteObjects(objects); if (removedobjects != null && undocommand != null) undocommand.AddLayerObjects(layer, removedobjects); } if (undocommand != null) m_undoBuffer.AddCommand(undocommand); }