Index: Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/Views/ClosingStructuresCalculationRow.cs =================================================================== diff -u -rbe9cffbc5ed8f0a3787298d5693574e49bf94981 -rc225ac27cdfd5aec62bbbc783762f275cd15fdd2 --- Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/Views/ClosingStructuresCalculationRow.cs (.../ClosingStructuresCalculationRow.cs) (revision be9cffbc5ed8f0a3787298d5693574e49bf94981) +++ Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/Views/ClosingStructuresCalculationRow.cs (.../ClosingStructuresCalculationRow.cs) (revision c225ac27cdfd5aec62bbbc783762f275cd15fdd2) @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; +using System.Linq; using Core.Common.Base.Data; using Core.Common.Controls.DataGrid; using Riskeer.ClosingStructures.Data; @@ -68,6 +69,7 @@ ColumnStateDefinitions = new Dictionary(); CreateColumnStateDefinitions(); UpdateUseBreakWaterColumnStateDefinitions(); + UpdateUseForeshoreColumnStateDefinitions(); } /// @@ -141,9 +143,8 @@ if (!CalculationScenario.InputParameters.UseBreakWater.Equals(value)) { PropertyChangeHelper.ChangePropertyAndNotify(() => CalculationScenario.InputParameters.UseBreakWater = value, propertyChangeHandler); + UpdateUseBreakWaterColumnStateDefinitions(); } - - UpdateUseBreakWaterColumnStateDefinitions(); } } @@ -188,6 +189,7 @@ if (!CalculationScenario.InputParameters.UseForeshore.Equals(value)) { PropertyChangeHelper.ChangePropertyAndNotify(() => CalculationScenario.InputParameters.UseForeshore = value, propertyChangeHandler); + UpdateUseForeshoreColumnStateDefinitions(); } } } @@ -274,5 +276,18 @@ ColumnStateHelper.EnableColumn(ColumnStateDefinitions[breakWaterHeightColumnIndex]); } } + + private void UpdateUseForeshoreColumnStateDefinitions() + { + ForeshoreProfile foreShoreProfileGeometry = CalculationScenario.InputParameters.ForeshoreProfile; + if (foreShoreProfileGeometry == null || !foreShoreProfileGeometry.Geometry.Any()) + { + ColumnStateHelper.DisableColumn(ColumnStateDefinitions[useForeshoreColumnIndex]); + } + else + { + ColumnStateHelper.EnableColumn(ColumnStateDefinitions[useForeshoreColumnIndex]); + } + } } } \ No newline at end of file Index: Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsCalculationRow.cs =================================================================== diff -u -r46b96a8bc87091274e3537e8bb5ca21aa0a6d04b -rc225ac27cdfd5aec62bbbc783762f275cd15fdd2 --- Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsCalculationRow.cs (.../GrassCoverErosionInwardsCalculationRow.cs) (revision 46b96a8bc87091274e3537e8bb5ca21aa0a6d04b) +++ Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsCalculationRow.cs (.../GrassCoverErosionInwardsCalculationRow.cs) (revision c225ac27cdfd5aec62bbbc783762f275cd15fdd2) @@ -142,9 +142,8 @@ if (!CalculationScenario.InputParameters.UseBreakWater.Equals(value)) { PropertyChangeHelper.ChangePropertyAndNotify(() => CalculationScenario.InputParameters.UseBreakWater = value, propertyChangeHandler); + UpdateUseBreakWaterColumnStateDefinitions(); } - - UpdateUseBreakWaterColumnStateDefinitions(); } }