void Complete() { NewWidget.SnappingPolicy = _new_widget_snapping_policy_prev; if (!DisposeOld && !Parent.ParentWidget.Remove(Parent)) { throw new Exception(); } NewWidget.ReplaceContainer(); EndAction(); }
public override object InitialClone() { var c = (ReplaceWidget)base.InitialClone(); c.NewWidget = (Widget)NewWidget?.Clone(); c.NewWidgetStart = (InnerWidgetLocation)NewWidgetStart?.Clone(); c.OldWidgetEnd = (InnerWidgetLocation)OldWidgetEnd?.Clone(); c.NewWidgetMovement = NewWidgetMovement; c.OldWidgetMovement = OldWidgetMovement; c.DisposeOld = DisposeOld; return(c); }