Index: src/Deltares.DSoilModel.Forms/DSoilModelGeometryEditor.cs =================================================================== diff -u -r607 -r612 --- src/Deltares.DSoilModel.Forms/DSoilModelGeometryEditor.cs (.../DSoilModelGeometryEditor.cs) (revision 607) +++ src/Deltares.DSoilModel.Forms/DSoilModelGeometryEditor.cs (.../DSoilModelGeometryEditor.cs) (revision 612) @@ -443,6 +443,7 @@ } else if (sender is CenterCrestLocation) { + updateForCenterCrestLocation = true; ShowSoilProfile2D(((CenterCrestLocation)sender).SoilProfile2D); } else if (sender is ConePenetrationTestData) @@ -481,18 +482,27 @@ var soilProfile2D = sender as SoilProfile2D; if (publishEventArgs.Property == soilProfile2D.GetMemberName(x => x.CenterCrestLocation)) { + if (localCenterCrestLocation == null && !double.IsNaN(soilProfile2D.CenterCrestLocation)) + { + localCenterCrestLocation = new CenterCrestLocation + { + SoilProfile2D = soilProfile2D + }; + + } if (localCenterCrestLocation != null && Object.ReferenceEquals(localCenterCrestLocation.SoilProfile2D, soilProfile2D) && - localCenterCrestLocation.Location != soilProfile2D.CenterCrestLocation) + Math.Abs(localCenterCrestLocation.Location - soilProfile2D.CenterCrestLocation) > double.Epsilon) { localCenterCrestLocation.Location = soilProfile2D.CenterCrestLocation; + DataEventPublisherOnSelectionChanged(localCenterCrestLocation, null); } } } if (ReferenceEquals(sender, spatialEditor) && publishEventArgs.Property == spatialEditor.GetMemberName(x => x.InsertType)) { DataEventPublisher.AfterChange(this); } - } + } private void DataEventPublisher_OnDataListModified(object sender, PublishEventArgs e) {