Index: Riskeer/HeightStructures/src/Riskeer.HeightStructures.Forms/Views/HeightStructuresCalculationRow.cs =================================================================== diff -u -raf130232784d0e332bbc4c97cd812e9750cd0f8b -rd6e12f8811540aa23f0eee7a3e91902fa1e18620 --- Riskeer/HeightStructures/src/Riskeer.HeightStructures.Forms/Views/HeightStructuresCalculationRow.cs (.../HeightStructuresCalculationRow.cs) (revision af130232784d0e332bbc4c97cd812e9750cd0f8b) +++ Riskeer/HeightStructures/src/Riskeer.HeightStructures.Forms/Views/HeightStructuresCalculationRow.cs (.../HeightStructuresCalculationRow.cs) (revision d6e12f8811540aa23f0eee7a3e91902fa1e18620) @@ -59,6 +59,7 @@ ColumnStateDefinitions = new Dictionary(); CreateColumnStateDefinitions(); UpdateUseBreakWaterColumnStateDefinitions(); + UpdateBreakWaterTypeAndHeightColumnStateDefinitions(); UpdateUseForeshoreColumnStateDefinitions(); } @@ -90,7 +91,7 @@ if (!Calculation.InputParameters.UseBreakWater.Equals(value)) { PropertyChangeHelper.ChangePropertyAndNotify(() => Calculation.InputParameters.UseBreakWater = value, PropertyChangeHandler); - UpdateUseBreakWaterColumnStateDefinitions(); + UpdateBreakWaterTypeAndHeightColumnStateDefinitions(); } } } @@ -207,7 +208,7 @@ ColumnStateDefinitions.Add(useForeshoreColumnIndex, new DataGridViewColumnStateDefinition()); } - private void UpdateUseBreakWaterColumnStateDefinitions() + private void UpdateBreakWaterTypeAndHeightColumnStateDefinitions() { if (!UseBreakWater) { @@ -227,11 +228,22 @@ if (foreShoreProfileGeometry == null || !foreShoreProfileGeometry.Geometry.Any()) { ColumnStateHelper.DisableColumn(ColumnStateDefinitions[useForeshoreColumnIndex]); - ColumnStateHelper.DisableColumn(ColumnStateDefinitions[useBreakWaterColumnIndex]); } else { ColumnStateHelper.EnableColumn(ColumnStateDefinitions[useForeshoreColumnIndex]); + } + } + + private void UpdateUseBreakWaterColumnStateDefinitions() + { + ForeshoreProfile foreShoreProfileGeometry = Calculation.InputParameters.ForeshoreProfile; + if (foreShoreProfileGeometry == null) + { + ColumnStateHelper.DisableColumn(ColumnStateDefinitions[useBreakWaterColumnIndex]); + } + else + { ColumnStateHelper.EnableColumn(ColumnStateDefinitions[useBreakWaterColumnIndex]); } }