diff --git a/source/addins/ProAppVisibilityModule/ViewModels/ProLLOSViewModel.cs b/source/addins/ProAppVisibilityModule/ViewModels/ProLLOSViewModel.cs index 037ebb5..298ff5e 100644 --- a/source/addins/ProAppVisibilityModule/ViewModels/ProLLOSViewModel.cs +++ b/source/addins/ProAppVisibilityModule/ViewModels/ProLLOSViewModel.cs @@ -376,6 +376,7 @@ internal override async Task CreateMapElement() } DeactivateTool(VisibilityMapTool.ToolId); + OnMapPointToolDeactivated(null); GC.Collect(); GC.WaitForPendingFinalizers(); diff --git a/source/addins/ProAppVisibilityModule/ViewModels/ProLOSBaseViewModel.cs b/source/addins/ProAppVisibilityModule/ViewModels/ProLOSBaseViewModel.cs index 4feb1d7..200d4bb 100644 --- a/source/addins/ProAppVisibilityModule/ViewModels/ProLOSBaseViewModel.cs +++ b/source/addins/ProAppVisibilityModule/ViewModels/ProLOSBaseViewModel.cs @@ -1075,21 +1075,10 @@ internal async void ReadPointFromLayer(Envelope surfaceEnvelope, ObservableColle .Where(lyr => lyr.Name == selectedLayerName && lyr.ShapeType == esriGeometryType.esriGeometryPoint).FirstOrDefault(); var cursor = layer.GetFeatureClass().Search(); - //define specific color for observer and target - SimpleMarkerStyle ms = SimpleMarkerStyle.Circle; - CIMColor color = ColorFactory.Instance.BlueRGB; - - if (tag == "target") - { - ms = SimpleMarkerStyle.Square; - color = ColorFactory.Instance.RedRGB; - } - while (cursor.MoveNext()) { var point = (MapPoint)cursor.Current["Shape"]; - var guid = await AddGraphicToMap(point, color, true, 5.0, markerStyle: ms, tag: tag); - var addInPoint = new AddInPoint { Point = point, GUID = guid }; + var addInPoint = new AddInPoint { Point = point, GUID = Guid.NewGuid().ToString() }; var objectId = -1; var FID = -1; try diff --git a/source/addins/ProAppVisibilityModule/ViewModels/ProRLOSViewModel.cs b/source/addins/ProAppVisibilityModule/ViewModels/ProRLOSViewModel.cs index 46e66bf..dd70aa9 100644 --- a/source/addins/ProAppVisibilityModule/ViewModels/ProRLOSViewModel.cs +++ b/source/addins/ProAppVisibilityModule/ViewModels/ProRLOSViewModel.cs @@ -330,6 +330,7 @@ internal override async Task CreateMapElement() } DeactivateTool(VisibilityMapTool.ToolId); + OnMapPointToolDeactivated(null); //await base.CreateMapElement(); }