From da470b567540ae0831d3ddb3efd0974dd52dc5a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?gabriel=2Ehuot-v=C3=A9zina?= Date: Tue, 12 Mar 2024 16:22:32 -0400 Subject: [PATCH] #312 fixed missing refresh in map page after data gathering. --- GSCFieldApp/ViewModels/MapPageViewModel.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/GSCFieldApp/ViewModels/MapPageViewModel.cs b/GSCFieldApp/ViewModels/MapPageViewModel.cs index 7db43161..db49bd8a 100644 --- a/GSCFieldApp/ViewModels/MapPageViewModel.cs +++ b/GSCFieldApp/ViewModels/MapPageViewModel.cs @@ -571,7 +571,16 @@ public void DisplayPointAndLabelsAsync(MapView inMapView, bool forceRefresh = fa { foreach (Graphic gr in _OverlayStation.Graphics) { - loadedGraphicList[gr.Attributes[Dictionaries.DatabaseLiterals.FieldLocationID].ToString()] = gr; + if (gr.Attributes.ContainsKey(Dictionaries.DatabaseLiterals.FieldLocationID)) + { + string gr_attr = gr.Attributes[Dictionaries.DatabaseLiterals.FieldLocationID].ToString(); + if (loadedGraphicList.ContainsKey(gr_attr)) + { + loadedGraphicList[gr_attr] = gr; + } + + } + } } @@ -1475,6 +1484,7 @@ private void modalDialogClosed(object sender) { //Unpaused graphic refresh pauseGraphicRefresh = false; + RefreshMap(pauseGraphicRefresh); } ///