Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/DesignWaterLevelLocationsView.cs
===================================================================
diff -u -rf4720b27ed71fe3f179b4301c3c0993cb9fe9094 -rb4a4cd5c690555b65075132adac80b146343430f
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/DesignWaterLevelLocationsView.cs (.../DesignWaterLevelLocationsView.cs) (revision f4720b27ed71fe3f179b4301c3c0993cb9fe9094)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/DesignWaterLevelLocationsView.cs (.../DesignWaterLevelLocationsView.cs) (revision b4a4cd5c690555b65075132adac80b146343430f)
@@ -22,6 +22,7 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
+using Core.Common.Base;
using Ringtoets.Common.Data.AssessmentSection;
using Ringtoets.Common.Data.Hydraulics;
using Ringtoets.Common.Forms.Views;
@@ -36,16 +37,21 @@
///
public partial class DesignWaterLevelLocationsView : HydraulicBoundaryLocationsView
{
+ private readonly DesignWaterLevelCalculationMessageProvider messageProvider;
+
///
/// Creates a new instance of .
///
+ /// The locations to show in the view.
/// The assessment section which the locations belong to.
- /// Thrown when
- /// is null.
- public DesignWaterLevelLocationsView(IAssessmentSection assessmentSection)
- : base(assessmentSection?.HydraulicBoundaryDatabase.Locations, assessmentSection)
+ /// Thrown when or
+ /// is null.
+ public DesignWaterLevelLocationsView(ObservableList locations, IAssessmentSection assessmentSection)
+ : base(locations, assessmentSection)
{
InitializeComponent();
+
+ messageProvider = new DesignWaterLevelCalculationMessageProvider();
}
protected override object CreateSelectedItemFromCurrentRow()
@@ -64,7 +70,7 @@
AssessmentSection.HydraulicBoundaryDatabase.EffectivePreprocessorDirectory(),
locations,
AssessmentSection.FailureMechanismContribution.Norm,
- new DesignWaterLevelCalculationMessageProvider());
+ messageProvider);
}
protected override void InitializeDataGridView()