void RemovePreviousCaption(VdCluster cluster, CaptionType type) { if (clusterAwaitingCaption.Captions.FreeDraw != null) { _doc.BeginRemoveSingleShape(clusterAwaitingCaption.Captions.FreeDraw.Id()); } if (clusterAwaitingCaption.Captions.text != null) { _doc.BeginRemoveSingleShape(clusterAwaitingCaption.Captions.text.Id()); } }
public void CancelLastLink() { if (_linkCreation.LastCreatedLink != null) { var link = _linkCreation.LastCreatedLink; if (link.GetCursor() == null && _doc.VolatileCtx.LocalCursor == null) { _doc.VolatileCtx.BeginTakeShapeWithLocalCursor(link.Id()); _doc.BeginRemoveSingleShape(link.Id()); } _linkCreation.LastCreatedLink = null; } }