Index: src/Deltares.DSoilModel.Forms/DSoilModelMapEditor.cs =================================================================== diff -u -r631 -r644 --- src/Deltares.DSoilModel.Forms/DSoilModelMapEditor.cs (.../DSoilModelMapEditor.cs) (revision 631) +++ src/Deltares.DSoilModel.Forms/DSoilModelMapEditor.cs (.../DSoilModelMapEditor.cs) (revision 644) @@ -52,8 +52,9 @@ private const int labelFontSize = 9; private readonly MapEditor mapEditor; - private readonly List mappedSoilProfiles1D = new List(); - private readonly List mappedSoilProfiles2D = new List(); + // DSB-709, temporary disabled for WTI + //private readonly List mappedSoilProfiles1D = new List(); + //private readonly List mappedSoilProfiles2D = new List(); private readonly Panel panel = new Panel(); @@ -75,8 +76,11 @@ mapEditor.WebLayerType = MapEditor.WebLayerTypes.OpenStreetMapnik; mapEditor.RegisterLayer(typeof(ConePenetrationTestData), new MapLayerDefinition(FeatureType.Point, "CPTs", Resources.CPT)); mapEditor.RegisterLayer(typeof(Boring), new MapLayerDefinition(FeatureType.Point, "Borings", Resources.Boring)); - mapEditor.RegisterLayer(typeof(SoilProfile1D), new MapLayerDefinition(FeatureType.Point, "1D Geometry", Resources.SoilProfile)); - mapEditor.RegisterLayer(typeof(SoilProfile2D), new MapLayerDefinition(FeatureType.Line, "2D Geometry", Color.Lime)); + + // DSB-709, temporary disabled for WTI + //mapEditor.RegisterLayer(typeof(SoilProfile1D), new MapLayerDefinition(FeatureType.Point, "1D Geometry", Resources.SoilProfile)); + //mapEditor.RegisterLayer(typeof(SoilProfile2D), new MapLayerDefinition(FeatureType.Line, "2D Geometry", Color.Lime)); + mapEditor.RegisterLayer(typeof(SoilSegment), new MapLayerDefinition(FeatureType.Line, "Soil Segment", Color.DarkBlue)); mapEditor.RegisterLayer(typeof(HighlightSoilSegment), new MapLayerDefinition(FeatureType.Line, "Split soil Segment", Color.DarkOrange, false)); mapEditor.RegisterLayer(typeof(SoilSegmentSplitLocation), SegmentSplitLocationLayerDefinition()); @@ -114,12 +118,12 @@ mapEditor.AddLayer(project.CPTs); mapEditor.AddLayer(project.Borings); - // Do not show profiles without a location - UpdateSoilProfiles1D(); - mapEditor.AddLayer(mappedSoilProfiles1D); + // DSB-709, temporary disabled for WTI + //UpdateSoilProfiles1D(); + //mapEditor.AddLayer(mappedSoilProfiles1D); + //UpdateSoilProfiles2D(); + //mapEditor.AddLayer(mappedSoilProfiles2D); - UpdateSoilProfiles2D(); - mapEditor.AddLayer(mappedSoilProfiles2D); mapEditor.AddLayer(project.CurrentSoilSegments); mapEditor.ZoomData(); @@ -381,15 +385,15 @@ return; } - // update soil profiles ? - if (sender == project.SoilProfiles1D) - { - UpdateSoilProfiles1D(); - } - if (sender == project.SoilProfiles2D) - { - UpdateSoilProfiles2D(); - } + // DSB-709, temporary disabled for WTI + //if (sender == project.SoilProfiles1D) + //{ + // UpdateSoilProfiles1D(); + //} + //if (sender == project.SoilProfiles2D) + //{ + // UpdateSoilProfiles2D(); + //} if (sender == project.SoilSegments) { @@ -413,22 +417,24 @@ private void DataEventPublisher_OnAfterChange(object sender, PublishEventArgs e) { - var soilProfile1D = sender as SoilProfile1D; - if (soilProfile1D != null) - { - if (e.Property != null && (e.Property.Equals("X") || e.Property.Equals("Y"))) - { - UpdateSoilProfiles1D(); - } - } - var soilProfile2D = sender as SoilProfile2D; - if (soilProfile2D != null) - { - if (e.Property != null && (e.Property.Equals("XBegin") || e.Property.Equals("YBegin") || e.Property.Equals("XEnd") || e.Property.Equals("XEnd"))) - { - UpdateSoilProfiles2D(); - } - } + // DSB-709, temporary disabled for WTI + //var soilProfile1D = sender as SoilProfile1D; + //if (soilProfile1D != null) + //{ + // if (e.Property != null && (e.Property.Equals("X") || e.Property.Equals("Y"))) + // { + // UpdateSoilProfiles1D(); + // } + //} + //var soilProfile2D = sender as SoilProfile2D; + //if (soilProfile2D != null) + //{ + // if (e.Property != null && (e.Property.Equals("XBegin") || e.Property.Equals("YBegin") || e.Property.Equals("XEnd") || e.Property.Equals("XEnd"))) + // { + // UpdateSoilProfiles2D(); + // } + //} + var splitLocation = sender as SoilSegmentSplitLocation; if (splitLocation != null && (e.Property == "X" || e.Property == "Y")) { @@ -471,19 +477,20 @@ } } - private void UpdateSoilProfiles1D() - { - mappedSoilProfiles1D.Clear(); - mappedSoilProfiles1D.AddRange(project.SoilProfiles1D.Where(sp => !double.IsNaN(sp.Location.X) && !double.IsNaN(sp.Location.Y))); - DataEventPublisher.DataListModified(mappedSoilProfiles1D); - } + // DSB-709, temporary disabled for WTI + //private void UpdateSoilProfiles1D() + //{ + // mappedSoilProfiles1D.Clear(); + // mappedSoilProfiles1D.AddRange(project.SoilProfiles1D.Where(sp => !double.IsNaN(sp.Location.X) && !double.IsNaN(sp.Location.Y))); + // DataEventPublisher.DataListModified(mappedSoilProfiles1D); + //} - private void UpdateSoilProfiles2D() - { - mappedSoilProfiles2D.Clear(); - mappedSoilProfiles2D.AddRange(project.SoilProfiles2D.Where(sp => !double.IsNaN(sp.Location.X) && !double.IsNaN(sp.Location.Y))); - DataEventPublisher.DataListModified(mappedSoilProfiles2D); - } + //private void UpdateSoilProfiles2D() + //{ + // mappedSoilProfiles2D.Clear(); + // mappedSoilProfiles2D.AddRange(project.SoilProfiles2D.Where(sp => !double.IsNaN(sp.Location.X) && !double.IsNaN(sp.Location.Y))); + // DataEventPublisher.DataListModified(mappedSoilProfiles2D); + //} private SoilSegmentSplitLocation AddSegmentSplitter(SoilSegment segment, SoilSegmentSplitLocation splitLocation = null) {