Index: src/Deltares.DSoilModel.Forms/DSoilModelGeometryEditor.cs =================================================================== diff -u -r1094 -r1095 --- src/Deltares.DSoilModel.Forms/DSoilModelGeometryEditor.cs (.../DSoilModelGeometryEditor.cs) (revision 1094) +++ src/Deltares.DSoilModel.Forms/DSoilModelGeometryEditor.cs (.../DSoilModelGeometryEditor.cs) (revision 1095) @@ -337,9 +337,11 @@ spatialEditor.EmptySelection.DataObject is SoilProfile; bool dataObjectEmptySelectionIsSoilProfile2D = spatialEditor.EmptySelection != null && spatialEditor.EmptySelection.DataObject is SoilProfile2D; + bool dataObjectEmptySelectionIsFilledSoilProfile2D = dataObjectEmptySelectionIsSoilProfile2D && + (spatialEditor.EmptySelection.DataObject as SoilProfile2D).Surfaces.Count > 0; bool dataObjectEmptySelectionIsFilledSoilProfile1D = spatialEditor.EmptySelection != null && - spatialEditor.EmptySelection.DataObject is SoilProfile1D && - (spatialEditor.EmptySelection.DataObject as SoilProfile1D).LayerCount > 0; + spatialEditor.EmptySelection.DataObject is SoilProfile1D && + (spatialEditor.EmptySelection.DataObject as SoilProfile1D).LayerCount > 0; bool dataObjectEmptySelectionIsFilledSurfaceLine2 = spatialEditor.EmptySelection != null && spatialEditor.EmptySelection.DataObject is SurfaceLine2 && (spatialEditor.EmptySelection.DataObject as SurfaceLine2).CharacteristicPoints.Count > 1; @@ -364,7 +366,8 @@ case "AddCenterCrestLocationTo2DProfile": return dataObjectEmptySelectionIsSoilProfile2D && !isCenterCrestDefined; case "AddSurfaceLineToCreateNew2DProfile": - return dataObjectEmptySelectionIsSoilProfile2D && projectHasSurfaceLinesWithDikes && isCenterCrestDefined; + return dataObjectEmptySelectionIsSoilProfile2D && projectHasSurfaceLinesWithDikes && + isCenterCrestDefined && dataObjectEmptySelectionIsFilledSoilProfile2D; case "AddSurfaceLineToCreate2DProfile": return dataObjectEmptySelectionIsFilledSoilProfile1D && project.SurfaceLines.Count > 0; case "Add1DProfileToCreate2DProfile":