public override void InvokeEnd(MouseEvent ev) { base.InvokeEnd(ev); if (clicked) { // HERZUM SPRINT 2.0 TLAB-99 // Experiment ownerExperiment = m_ownerConnection.Owner; IEditableExperiment ownerExperiment = m_ownerConnection.ExperimentNodeConnection.Target.Owner as IEditableExperiment; if (ownerExperiment != null) { // END HERZUM SPRINT 2.0 TLAB-99 ownerExperiment.RemoveConnection(m_ownerConnection.ExperimentNodeConnection); } } clicked = false; }
/// <summary> /// Removes the given connection from the m_experiment. /// </summary> /// <param name="edge">The edge to remove</param> /// <exception cref="System.InvalidOperationException">Thrown if the ViewModel is in a bad state that it cannot recover from</exception> public void RemoveConnection(ExperimentNodeConnection edge) { m_experiment.RemoveConnection(edge); }