Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/AssessmentSectionView.cs =================================================================== diff -u -rf1bd17ba95b3fbae5928d4240523d50d8b83b64d -rf04895089d34bddb618db8c7001c574428be10c6 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/AssessmentSectionView.cs (.../AssessmentSectionView.cs) (revision f1bd17ba95b3fbae5928d4240523d50d8b83b64d) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/AssessmentSectionView.cs (.../AssessmentSectionView.cs) (revision f04895089d34bddb618db8c7001c574428be10c6) @@ -61,17 +61,37 @@ } set { - data = value as IAssessmentSection; + var newValue = value as IAssessmentSection; - if (data != null) + DetachFromData(); + data = newValue; + if (data == null) { - data.Detach(this); - SetDataToMap(); - data.Attach(this); + Map.ResetMapData(); + return; } + + SetDataToMap(); + AttachToData(); } } + private void AttachToData() + { + if (data != null) + { + data.Attach(this); + } + } + + private void DetachFromData() + { + if (data != null) + { + data.Detach(this); + } + } + public IMapControl Map { get