Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsStochasticSoilProfileProperties.cs =================================================================== diff -u -r59adecfc7f82ab8277440ecae147453f5cbddbbf -r0950c1a469810e87b914ad0bc0cebbca32850a4e --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsStochasticSoilProfileProperties.cs (.../MacroStabilityInwardsStochasticSoilProfileProperties.cs) (revision 59adecfc7f82ab8277440ecae147453f5cbddbbf) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsStochasticSoilProfileProperties.cs (.../MacroStabilityInwardsStochasticSoilProfileProperties.cs) (revision 0950c1a469810e87b914ad0bc0cebbca32850a4e) @@ -31,6 +31,7 @@ using Core.Common.Utils.Attributes; using Ringtoets.MacroStabilityInwards.Data.SoilProfile; using Ringtoets.MacroStabilityInwards.Forms.Properties; +using Ringtoets.MacroStabilityInwards.Primitives; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; namespace Ringtoets.MacroStabilityInwards.Forms.PropertyClasses @@ -102,13 +103,16 @@ [TypeConverter(typeof(ExpandableArrayConverter))] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.StochasticSoilProfile_Layers_DisplayName))] - public MacroStabilityInwardsSoilLayer2DProperties[] Layers2D + public MacroStabilityInwardsSoilLayer2DTopLevelProperties[] Layers2D { get { - IEnumerable macroStabilityInwardsSoilLayers2D = (data.SoilProfile as MacroStabilityInwardsSoilProfile2D)?.Layers; - return macroStabilityInwardsSoilLayers2D?.Select(layer => new MacroStabilityInwardsSoilLayer2DProperties(layer)).ToArray() ?? - new MacroStabilityInwardsSoilLayer2DProperties[0]; + IEnumerable layers = (data.SoilProfile as MacroStabilityInwardsSoilProfile2D)?.Layers; + IEnumerable macroStabilityInwardsSoilLayers2D = layers != null + ? MacroStabilityInwardsSoilProfile2DLayersHelper.GetLayersRecursively(layers) + : new List(); + return macroStabilityInwardsSoilLayers2D?.Select(layer => new MacroStabilityInwardsSoilLayer2DTopLevelProperties(layer)).ToArray() ?? + new MacroStabilityInwardsSoilLayer2DTopLevelProperties[0]; } }