/// <summary> /// Remove the substroke and delete the parent shape if it is empty. /// </summary> protected override void performActual() { _shape.RemoveSubstroke(_substroke); if (_shape.IsEmpty) { MySketch.RemoveShape(_shape); } }
/// <summary> /// Make the substroke trade. /// </summary> protected override void performActual() { foreach (EndPoint endpoint in _gem.Endpoints) { endpoint.ConnectedShape = null; } Shape victim = _gem.ParentShape; if (victim != null) { victim.RemoveSubstroke(_gem); } _thief.AddSubstroke(_gem); if (victim != null && victim.Substrokes.Length == 0) { MySketch.RemoveShape(victim); } MySketch.CheckConsistency(); }