Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/DesignWaterLevelLocationsView.cs =================================================================== diff -u -r24942d5d831cb0d67336dd9d5506a4a23cf099f5 -r13c53cd1231ab43cab258598b0e87f48ca0fd324 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/DesignWaterLevelLocationsView.cs (.../DesignWaterLevelLocationsView.cs) (revision 24942d5d831cb0d67336dd9d5506a4a23cf099f5) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/DesignWaterLevelLocationsView.cs (.../DesignWaterLevelLocationsView.cs) (revision 13c53cd1231ab43cab258598b0e87f48ca0fd324) @@ -71,9 +71,14 @@ { DataGridViewRow currentRow = dataGridViewControl.CurrentRow; - return currentRow != null - ? new DesignWaterLevelLocationContext(((HydraulicBoundaryLocationRow) currentRow.DataBoundItem).CalculatableObject) - : null; + if (currentRow != null) + { + HydraulicBoundaryLocation hydraulicBoundaryLocation = ((HydraulicBoundaryLocationRow) currentRow.DataBoundItem).CalculatableObject; + + return new DesignWaterLevelLocationContext(hydraulicBoundaryLocation, GetCalculationFunc(hydraulicBoundaryLocation)); + } + + return null; } protected override void HandleCalculateSelectedLocations(IEnumerable locations) Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/WaveHeightLocationsView.cs =================================================================== diff -u -r24942d5d831cb0d67336dd9d5506a4a23cf099f5 -r13c53cd1231ab43cab258598b0e87f48ca0fd324 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/WaveHeightLocationsView.cs (.../WaveHeightLocationsView.cs) (revision 24942d5d831cb0d67336dd9d5506a4a23cf099f5) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/WaveHeightLocationsView.cs (.../WaveHeightLocationsView.cs) (revision 13c53cd1231ab43cab258598b0e87f48ca0fd324) @@ -71,9 +71,14 @@ { DataGridViewRow currentRow = dataGridViewControl.CurrentRow; - return currentRow != null - ? new WaveHeightLocationContext(((HydraulicBoundaryLocationRow) currentRow.DataBoundItem).CalculatableObject) - : null; + if (currentRow != null) + { + HydraulicBoundaryLocation hydraulicBoundaryLocation = ((HydraulicBoundaryLocationRow) currentRow.DataBoundItem).CalculatableObject; + + return new WaveHeightLocationContext(hydraulicBoundaryLocation, GetCalculationFunc(hydraulicBoundaryLocation)); + } + + return null; } protected override void HandleCalculateSelectedLocations(IEnumerable locations) Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs =================================================================== diff -u -r3cae63a44735f53a20236b660138d6b0fdc2f98f -r13c53cd1231ab43cab258598b0e87f48ca0fd324 --- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision 3cae63a44735f53a20236b660138d6b0fdc2f98f) +++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision 13c53cd1231ab43cab258598b0e87f48ca0fd324) @@ -331,7 +331,7 @@ }; yield return new PropertyInfo { - CreateInstance = context => new DesignWaterLevelLocationProperties(context.WrappedData, context.WrappedData.DesignWaterLevelCalculation1) + CreateInstance = context => new DesignWaterLevelLocationProperties(context.WrappedData, context.Calculation) }; yield return new PropertyInfo { @@ -340,7 +340,7 @@ }; yield return new PropertyInfo { - CreateInstance = context => new WaveHeightLocationProperties(context.WrappedData, context.WrappedData.WaveHeightCalculation1) + CreateInstance = context => new WaveHeightLocationProperties(context.WrappedData, context.Calculation) }; yield return new PropertyInfo(); yield return new PropertyInfo Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs =================================================================== diff -u -ra722967209e56d9af9e59ef95b28ad91f7fe5b42 -r13c53cd1231ab43cab258598b0e87f48ca0fd324 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs (.../DesignWaterLevelLocationsViewTest.cs) (revision a722967209e56d9af9e59ef95b28ad91f7fe5b42) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/DesignWaterLevelLocationsViewTest.cs (.../DesignWaterLevelLocationsViewTest.cs) (revision 13c53cd1231ab43cab258598b0e87f48ca0fd324) @@ -676,7 +676,9 @@ protected override object GetLocationSelection(LocationsView view, object selectedRowObject) { - return new DesignWaterLevelLocationContext(((HydraulicBoundaryLocationRow) selectedRowObject).CalculatableObject); + HydraulicBoundaryLocation hydraulicBoundaryLocation = ((HydraulicBoundaryLocationRow) selectedRowObject).CalculatableObject; + + return new DesignWaterLevelLocationContext(hydraulicBoundaryLocation, GetCalculationForLocation(hydraulicBoundaryLocation)); } protected override LocationsView ShowFullyConfiguredLocationsView(Form form) Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs =================================================================== diff -u -ra722967209e56d9af9e59ef95b28ad91f7fe5b42 -r13c53cd1231ab43cab258598b0e87f48ca0fd324 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs (.../WaveHeightLocationsViewTest.cs) (revision a722967209e56d9af9e59ef95b28ad91f7fe5b42) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WaveHeightLocationsViewTest.cs (.../WaveHeightLocationsViewTest.cs) (revision 13c53cd1231ab43cab258598b0e87f48ca0fd324) @@ -676,7 +676,9 @@ protected override object GetLocationSelection(LocationsView view, object selectedRowObject) { - return new WaveHeightLocationContext(((HydraulicBoundaryLocationRow) selectedRowObject).CalculatableObject); + HydraulicBoundaryLocation hydraulicBoundaryLocation = ((HydraulicBoundaryLocationRow) selectedRowObject).CalculatableObject; + + return new WaveHeightLocationContext(hydraulicBoundaryLocation, GetCalculationForLocation(hydraulicBoundaryLocation)); } protected override LocationsView ShowFullyConfiguredLocationsView(Form form)