Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/GeneralResultFaultTreeIllustrationPointView.cs =================================================================== diff -u -r244dd8357f6de439ff2364fa675a9e128da84b5c -r7e53012ecddcce8dd6c01cfbe48769ea2a4e5f8c --- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/GeneralResultFaultTreeIllustrationPointView.cs (.../GeneralResultFaultTreeIllustrationPointView.cs) (revision 244dd8357f6de439ff2364fa675a9e128da84b5c) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/GeneralResultFaultTreeIllustrationPointView.cs (.../GeneralResultFaultTreeIllustrationPointView.cs) (revision 7e53012ecddcce8dd6c01cfbe48769ea2a4e5f8c) @@ -41,7 +41,7 @@ private readonly Func> getGeneralResultFunc; private ICalculation data; - private bool suspendAllEvents; + private bool suspendllustrationPointsControlEvents; public event EventHandler SelectionChanged; @@ -107,35 +107,28 @@ /// or . private void UpdateControls() { - suspendAllEvents = true; + suspendllustrationPointsControlEvents = true; UpdateIllustrationPointsControl(); - UpdateIllustrationPointsFaultTreeControl(); - suspendAllEvents = false; + suspendllustrationPointsControlEvents = false; + UpdateIllustrationPointsFaultTreeControl(); ProvideIllustrationPointSelection(); } private void IllustrationPointsFaultTreeControlOnSelectionChanged(object sender, EventArgs eventArgs) { - if (suspendAllEvents) - { - return; - } - var selection = illustrationPointsFaultTreeControl.Selection as IllustrationPointNode; TopLevelFaultTreeIllustrationPoint topLevelFaultTreeIllustrationPoint = illustrationPointsFaultTreeControl.Data; - if (selection != null && topLevelFaultTreeIllustrationPoint != null) + if (selection == null || topLevelFaultTreeIllustrationPoint == null) { - Selection = new IllustrationPointNodeContext(selection, - topLevelFaultTreeIllustrationPoint.WindDirection.Name, - topLevelFaultTreeIllustrationPoint.ClosingSituation); + return; } - else - { - Selection = null; - } + Selection = new IllustrationPointNodeContext(selection, + topLevelFaultTreeIllustrationPoint.WindDirection.Name, + topLevelFaultTreeIllustrationPoint.ClosingSituation); + OnSelectionChanged(); } @@ -197,7 +190,7 @@ private void IllustrationPointsControlOnSelectionChanged(object sender, EventArgs e) { - if (suspendAllEvents) + if (suspendllustrationPointsControlEvents) { return; }