Index: DamEngine/trunk/src/Deltares.DamEngine.Calculators/PlLinesCreator/PlLinesCreator.cs =================================================================== diff -u -r3893 -r3900 --- DamEngine/trunk/src/Deltares.DamEngine.Calculators/PlLinesCreator/PlLinesCreator.cs (.../PlLinesCreator.cs) (revision 3893) +++ DamEngine/trunk/src/Deltares.DamEngine.Calculators/PlLinesCreator/PlLinesCreator.cs (.../PlLinesCreator.cs) (revision 3900) @@ -886,20 +886,22 @@ private PlLines CreateAllPlLinesWithExpertKnowledge(Location location) { PlLines plLines = new PlLines(); - foreach (PlLineType plLineType in Enum.GetValues(typeof(PlLineType))) + foreach (PlLineType plLineType in Enum.GetValues(typeof(PlLineType))) { - bool isPl1LineDefinedForLocation = (location != null) && (location.LocalXzpl1Line != null) && (location.LocalXzpl1Line.Points.Count > 1); - if ((plLineType == PlLineType.Pl1) && isPl1LineDefinedForLocation) + if (location != null) { - PlLine plLine = plLines.Lines[plLineType]; - CopyPointsInPlLine(ref plLine, location.LocalXzpl1Line); - } - else - { - if (location != null) - { - plLines.Lines[plLineType] = CreatePlLineByExpertKnowledge(plLineType, location.SlopeDampingPiezometricHeightPolderSide); + bool isPl1LineDefinedForLocation = location.LocalXzpl1Line != null && + location.LocalXzpl1Line.Points.Count > 1; + if ((plLineType == PlLineType.Pl1) && isPl1LineDefinedForLocation) + { + PlLine plLine = plLines.Lines[plLineType]; + CopyPointsInPlLine(ref plLine, location.LocalXzpl1Line); } + else + { + plLines.Lines[plLineType] = CreatePlLineByExpertKnowledge(plLineType, + location.SlopeDampingPiezometricHeightPolderSide); + } } // currentPL1Line is needed when calculating uplift reduction for PL3 and Pl4