Index: src/Deltares.DSoilModel.Forms/DSoilModelGeometryEditor.cs =================================================================== diff -u -r803 -r866 --- src/Deltares.DSoilModel.Forms/DSoilModelGeometryEditor.cs (.../DSoilModelGeometryEditor.cs) (revision 803) +++ src/Deltares.DSoilModel.Forms/DSoilModelGeometryEditor.cs (.../DSoilModelGeometryEditor.cs) (revision 866) @@ -1240,7 +1240,12 @@ surfaceLine2.CharacteristicPoints.GetGeometryPoint(CharacteristicPointType.DikeTopAtPolder).X)*0.5; } soilSurfaceProfile.Dispose(); - AddSoilProfile2DToProjectAndUpdateUI(soilProfile2D); + // For some obscure reason, the created soilProfile2D is handled wrong in the UI (see DSB=786). + // Its curves do not seem to match the surfaces in the events send on selecting and dragging a curve. + // This causes the stange behaviour. To solve this, a Clone is made of the soilProfile2D and that clone is added instead. + var newsp2 = (SoilProfile2D)soilProfile2D.Clone(); + soilProfile2D.Dispose(); + AddSoilProfile2DToProjectAndUpdateUI(newsp2); } private void AddSoilProfile2DToProjectAndUpdateUI(SoilProfile2D soilProfile2D) @@ -1253,6 +1258,8 @@ if (table != null) { mainForm.SetAsActiveTable(table); + // Make sure the new soilprofile2D is updated in this editor + updateForCenterCrestLocation = true; DataEventPublisher.SelectionChanged(soilProfile2D); } }