Index: src/Deltares.DSoilModel.Forms/DSoilModelPlugin.cs =================================================================== diff -u -r611 -r617 --- src/Deltares.DSoilModel.Forms/DSoilModelPlugin.cs (.../DSoilModelPlugin.cs) (revision 611) +++ src/Deltares.DSoilModel.Forms/DSoilModelPlugin.cs (.../DSoilModelPlugin.cs) (revision 617) @@ -311,7 +311,7 @@ if (modelProject != null) { project = modelProject; - project.CurrentFailureMechanism = Mechanism.Everything; + project.CurrentFailureMechanism = Mechanism.None; StochasticSoilProfile.GetProfiles = project.GetProfiles; ConePenetrationTestPerSegment.GetCpts = project.GetCpts; @@ -517,7 +517,7 @@ if (publishEventArgs.Property.Equals("CurrentFailureMechanism")) { - if (project.CurrentFailureMechanism != Mechanism.Everything) + if (project.CurrentFailureMechanism != Mechanism.None) { SetSoilUserFilterForMaterialTableToFilterAll(); EnableSoilUserFilterForMaterialTable(false); @@ -919,10 +919,11 @@ // override SoilLayerControl which is registered in geotechnics plugin, replace with local SOSSoilLayerControl control mainForm.DynamicPropertyControl.ClearRegistrationsForType(typeof(SoilLayer1D)); + mainForm.DynamicPropertyControl.BuildDelayedPropertyControlForTypes(() => new SosSoilLayer1DControl(), typeof(SosSoilLayer1D), typeof(SoilLayer1D)); + //#Bka: typeof(SoilLayer1D) should NOT be needed but without it it can now never find the proper control + // override SoilProfile1DControl which is registered in geotechnics plugin, replace with local SOSSoilProfile1DControl control mainForm.DynamicPropertyControl.ClearRegistrationsForType(typeof(SoilProfile1D)); - - mainForm.DynamicPropertyControl.BuildDelayedPropertyControlForTypes(() => new SosSoilLayer1DControl(), typeof(SosSoilLayer1D)); mainForm.DynamicPropertyControl.BuildDelayedPropertyControlForTypes(() => new SosSoilProfile1DControl(), typeof(SoilProfile1D), typeof(SosSoilLayer1D)); mainForm.DynamicPropertyControl.BuildDelayedPropertyControlForTypes(() => new SoilProfile1DLookup2DControl(), typeof(SoilProfile1DLookup2D)); mainForm.DynamicPropertyControl.BuildDelayedPropertyControlForTypes(() => new SoilProfile2DControl(), typeof(SoilProfile2D)); @@ -1104,17 +1105,6 @@ } var result = true; - - // soil in borings - foreach (var b in Project.Borings) - { - if (b.BoringLayers.Any(x => x.Soil == soil)) - { - LogErrorCannotDelete(soil, b); - result = false; - } - } - // 1D profiles foreach (var sp1d in Project.SoilProfiles1D) { @@ -1271,7 +1261,7 @@ // with the selected CurrentMechanism of the project. Soil.Mechanisms = new[] { - Mechanism.Everything, + Mechanism.None, Mechanism.Piping, Mechanism.Stability, }; @@ -1489,7 +1479,7 @@ DataEventPublisher.IsDataEventPublishStopped = false; DataEventPublisher.DataListModified(project.Soils.Soils); BindSupport.UpdateAll(); - project.CurrentFailureMechanism = Mechanism.Everything; + project.CurrentFailureMechanism = Mechanism.None; Project = project; CheckLogWarnings(countWarnings); } @@ -1521,7 +1511,7 @@ // reset project mapEditor.Project = project; - project.CurrentFailureMechanism = Mechanism.Everything; + project.CurrentFailureMechanism = Mechanism.None; // add Dam locations as background map if (!string.IsNullOrEmpty(locationsShpFile)) @@ -1588,7 +1578,7 @@ DataEventPublisher.IsDataEventPublishStopped = false; DataEventPublisher.DataListModified(project.Soils.Soils); BindSupport.UpdateAll(); - project.CurrentFailureMechanism = Mechanism.Everything; + project.CurrentFailureMechanism = Mechanism.None; mapEditor.Project = project; CheckLogWarnings(countWarnings); } @@ -1792,7 +1782,7 @@ DataEventPublisher.IsDataEventPublishStopped = false; DataEventPublisher.DataListModified(project.SurfaceLines); BindSupport.UpdateAll(); - project.CurrentFailureMechanism = Mechanism.Everything; + project.CurrentFailureMechanism = Mechanism.None; CheckLogWarnings(countWarnings); } @@ -1823,7 +1813,7 @@ if (Path.GetExtension(fileName) == ".csv") { DSoilModelIO.ReadCsvSegmentsFromFileAndAddToProject(fileName, project); - project.CurrentFailureMechanism = Mechanism.Everything; + project.CurrentFailureMechanism = Mechanism.None; } } } @@ -1843,7 +1833,7 @@ DataEventPublisher.DataListModified(project.SoilProfiles2D); DataEventPublisher.DataListModified(project.SoilSegments); BindSupport.UpdateAll(); - project.CurrentFailureMechanism = Mechanism.Everything; + project.CurrentFailureMechanism = Mechanism.None; } CheckLogWarnings(countWarnings); } @@ -1924,7 +1914,7 @@ DataEventPublisher.DataListModified(project.SoilSegments); BindSupport.UpdateAll(); - project.CurrentFailureMechanism = Mechanism.Everything; + project.CurrentFailureMechanism = Mechanism.None; mapEditor.ZoomData(); } CheckLogWarnings(countWarnings);