Index: Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Forms/Views/StabilityPointStructuresCalculationRow.cs =================================================================== diff -u -r85f99d0f373b5ccc84747cd1db01c6039cb58053 -r4936c95daeadf1d6bae41b43d57d0122f9b7b40f --- Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Forms/Views/StabilityPointStructuresCalculationRow.cs (.../StabilityPointStructuresCalculationRow.cs) (revision 85f99d0f373b5ccc84747cd1db01c6039cb58053) +++ Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Forms/Views/StabilityPointStructuresCalculationRow.cs (.../StabilityPointStructuresCalculationRow.cs) (revision 4936c95daeadf1d6bae41b43d57d0122f9b7b40f) @@ -41,6 +41,7 @@ /// public class StabilityPointStructuresCalculationRow : CalculationRow>, IHasColumnStateDefinitions { + private const int useBreakWaterColumnIndex = 3; private const int breakWaterTypeColumnIndex = 4; private const int breakWaterHeightColumnIndex = 5; private const int useForeshoreColumnIndex = 6; @@ -78,6 +79,7 @@ if (!ReferenceEquals(Calculation.InputParameters.ForeshoreProfile, valueToSet)) { PropertyChangeHelper.ChangePropertyAndNotify(() => Calculation.InputParameters.ForeshoreProfile = valueToSet, PropertyChangeHandler); + UpdateUseForeshoreColumnStateDefinitions(); } } } @@ -250,6 +252,7 @@ private void CreateColumnStateDefinitions() { + ColumnStateDefinitions.Add(useBreakWaterColumnIndex, new DataGridViewColumnStateDefinition()); ColumnStateDefinitions.Add(breakWaterTypeColumnIndex, new DataGridViewColumnStateDefinition()); ColumnStateDefinitions.Add(breakWaterHeightColumnIndex, new DataGridViewColumnStateDefinition()); ColumnStateDefinitions.Add(useForeshoreColumnIndex, new DataGridViewColumnStateDefinition()); @@ -279,10 +282,12 @@ if (foreShoreProfileGeometry == null || !foreShoreProfileGeometry.Geometry.Any()) { ColumnStateHelper.DisableColumn(ColumnStateDefinitions[useForeshoreColumnIndex]); + ColumnStateHelper.DisableColumn(ColumnStateDefinitions[useBreakWaterColumnIndex]); } else { ColumnStateHelper.EnableColumn(ColumnStateDefinitions[useForeshoreColumnIndex]); + ColumnStateHelper.EnableColumn(ColumnStateDefinitions[useBreakWaterColumnIndex]); } } Index: Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresCalculationRowTest.cs =================================================================== diff -u -r084841826fac2142498b963305a2265119a0c774 -r4936c95daeadf1d6bae41b43d57d0122f9b7b40f --- Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresCalculationRowTest.cs (.../StabilityPointStructuresCalculationRowTest.cs) (revision 084841826fac2142498b963305a2265119a0c774) +++ Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresCalculationRowTest.cs (.../StabilityPointStructuresCalculationRowTest.cs) (revision 4936c95daeadf1d6bae41b43d57d0122f9b7b40f) @@ -45,6 +45,7 @@ [TestFixture] public class StabilityPointStructuresCalculationRowTest { + private const int useBreakWaterColumnIndex = 3; private const int breakWaterTypeColumnIndex = 4; private const int breakWaterHeightColumnIndex = 5; private const int useForeshoreColumnIndex = 6; @@ -73,8 +74,9 @@ Assert.AreSame(calculationScenario, row.Calculation); IDictionary columnStateDefinitions = row.ColumnStateDefinitions; - Assert.AreEqual(7, columnStateDefinitions.Count); + Assert.AreEqual(8, columnStateDefinitions.Count); + DataGridViewControlColumnStateDefinitionTestHelper.AssertColumnStateDefinition(columnStateDefinitions, useBreakWaterColumnIndex); DataGridViewControlColumnStateDefinitionTestHelper.AssertColumnStateDefinition(columnStateDefinitions, breakWaterTypeColumnIndex); DataGridViewControlColumnStateDefinitionTestHelper.AssertColumnStateDefinition(columnStateDefinitions, breakWaterHeightColumnIndex); DataGridViewControlColumnStateDefinitionTestHelper.AssertColumnStateDefinition(columnStateDefinitions, useForeshoreColumnIndex);