public virtual void HandleDeleteReferenceCommand(Command cmd)
{
CheckDisposed();
if (NextSlice != null && NextSlice.Object != null)
{
var ler = NextSlice.Object as ILexEntryRef;
if (ler != null)
{
UndoableUnitOfWorkHelper.Do(DetailControlsStrings.ksUndoDeleteRef, DetailControlsStrings.ksRedoDeleteRef, ler, () =>
{
ler.ComponentLexemesRS.Remove(ContainingDataTree.Root);
// probably not needed, but safe...
if (ler.PrimaryLexemesRS.Contains(ContainingDataTree.Root))
ler.PrimaryLexemesRS.Remove(ContainingDataTree.Root);
});
}
}
}