Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/Map/AssessmentSectionMapData.cs =================================================================== diff -u -r2310b1df9f3fcfa1e01ee6eec2206a4dd0f38f5c -rb1ae263dccbb283a2feeb06e53d2486de7fd4258 --- Ringtoets/Integration/src/Ringtoets.Integration.Data/Map/AssessmentSectionMapData.cs (.../AssessmentSectionMapData.cs) (revision 2310b1df9f3fcfa1e01ee6eec2206a4dd0f38f5c) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/Map/AssessmentSectionMapData.cs (.../AssessmentSectionMapData.cs) (revision b1ae263dccbb283a2feeb06e53d2486de7fd4258) @@ -32,7 +32,7 @@ /// public class AssessmentSectionMapData : MapDataCollection, IEquatable { - private readonly AssessmentSectionBase assessmentSection; + public AssessmentSectionBase AssessmentSection { get; private set; } /// /// Creates a new instance of . @@ -45,7 +45,8 @@ { throw new ArgumentNullException("assessmentSection"); } - this.assessmentSection = assessmentSection; + + AssessmentSection = assessmentSection; CheckHydraulicBoundaryDatabaseLocationData(); } @@ -68,7 +69,7 @@ private List GetHydraulicBoundaryDatabaseLocationData() { - return assessmentSection.HydraulicBoundaryDatabase.Locations.Select(hydraulicBoundaryLocation => hydraulicBoundaryLocation.Location).ToList(); + return AssessmentSection.HydraulicBoundaryDatabase.Locations.Select(hydraulicBoundaryLocation => hydraulicBoundaryLocation.Location).ToList(); } private void CreateMapPointData(IEnumerable locationData) @@ -80,7 +81,7 @@ public bool Equals(AssessmentSectionMapData other) { - return other != null && Equals(other.assessmentSection, assessmentSection); + return other != null && Equals(other.AssessmentSection, AssessmentSection); } public override bool Equals(object other) @@ -90,7 +91,7 @@ public override int GetHashCode() { - return assessmentSection.GetHashCode(); + return AssessmentSection.GetHashCode(); } #endregion Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsGuiPlugin.cs =================================================================== diff -u -r5c46540fa1f9d4aa07500fe0f350f2eef3624e72 -rb1ae263dccbb283a2feeb06e53d2486de7fd4258 --- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsGuiPlugin.cs (.../RingtoetsGuiPlugin.cs) (revision 5c46540fa1f9d4aa07500fe0f350f2eef3624e72) +++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsGuiPlugin.cs (.../RingtoetsGuiPlugin.cs) (revision b1ae263dccbb283a2feeb06e53d2486de7fd4258) @@ -102,8 +102,15 @@ { assessmentSectionMapData = new AssessmentSectionMapData(assessmentSectionBase); return assessmentSectionMapData; + }, + CloseForData = (view, o) => + { + var sectionMapData = (AssessmentSectionMapData) view.Data; + var assessmentSection = o as AssessmentSectionBase; + + return assessmentSection != null && sectionMapData.AssessmentSection == assessmentSection; }, - Image = RingtoetsFormsResources.Map + Image = RingtoetsFormsResources.Map, }; } @@ -117,13 +124,9 @@ var assessmentSection = dataObject as AssessmentSectionBase; if (assessmentSection != null) { + yield return assessmentSection; yield return assessmentSection.FailureMechanismContribution; } - - if (assessmentSectionMapData != null) - { - yield return assessmentSectionMapData; - } } /// Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsGuiPluginTest.cs =================================================================== diff -u -racbd08302b69fc06e5cade26def0dea4d35e3b92 -rb1ae263dccbb283a2feeb06e53d2486de7fd4258 --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsGuiPluginTest.cs (.../RingtoetsGuiPluginTest.cs) (revision acbd08302b69fc06e5cade26def0dea4d35e3b92) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsGuiPluginTest.cs (.../RingtoetsGuiPluginTest.cs) (revision b1ae263dccbb283a2feeb06e53d2486de7fd4258) @@ -137,8 +137,9 @@ var childrenWithViewDefinitions = guiPlugin.GetChildDataWithViewDefinitions(assessmentSectionBase); // Assert - CollectionAssert.AreEqual(new[] + CollectionAssert.AreEqual(new object[] { + assessmentSectionBase, assessmentSectionBase.FailureMechanismContribution }, childrenWithViewDefinitions); mocks.VerifyAll();