Index: Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/Views/ClosingStructuresCalculationRow.cs =================================================================== diff -u -r10fd0d522407433c63688d1de6314e83230aa01a -r9294e152c4fd89e8aff2596ef4ba798dce06cd21 --- Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/Views/ClosingStructuresCalculationRow.cs (.../ClosingStructuresCalculationRow.cs) (revision 10fd0d522407433c63688d1de6314e83230aa01a) +++ Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/Views/ClosingStructuresCalculationRow.cs (.../ClosingStructuresCalculationRow.cs) (revision 9294e152c4fd89e8aff2596ef4ba798dce06cd21) @@ -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(); } } } @@ -222,7 +223,7 @@ ColumnStateDefinitions.Add(useForeshoreColumnIndex, new DataGridViewColumnStateDefinition()); } - private void UpdateUseBreakWaterColumnStateDefinitions() + private void UpdateBreakWaterTypeAndHeightColumnStateDefinitions() { if (!UseBreakWater) { @@ -242,11 +243,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]); } }