Skip to content

Commit 11581ce

Browse files
committed
Fix a refresh bug in the Galactic POI monitor
1 parent aac8936 commit 11581ce

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

NavigationMonitor/ConfigurationWindow.xaml.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,16 @@ public void addBookmark(object sender, RoutedEventArgs e)
7575
}
7676
}
7777
}
78+
79+
public void refreshGalacticPOIs ()
80+
{
81+
foreach (var t in tabControl.Items)
82+
{
83+
if ( t is TabItem tabItem && tabItem.Content is GalacticPOIControl poiControl )
84+
{
85+
poiControl.POIView.Refresh();
86+
}
87+
}
88+
}
7889
}
7990
}

NavigationMonitor/NavigationMonitor.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
using System;
99
using System.Collections.Generic;
1010
using System.Collections.ObjectModel;
11-
using System.ComponentModel;
1211
using System.Linq;
1312
using System.Threading;
1413
using System.Threading.Tasks;
@@ -564,10 +563,7 @@ private async Task UpdateStellarLocationDataAsync(DateTime timestamp, ulong? sys
564563
// We need to refresh a collection view for galactic POIs
565564
await Application.Current.Dispatcher.InvokeAsync( () =>
566565
{
567-
if ( ConfigurationWindow.Instance.TryFindResource( nameof( GalacticPOIControl.POIView ) ) is ICollectionView poiView )
568-
{
569-
poiView.Refresh();
570-
}
566+
ConfigurationWindow.Instance.refreshGalacticPOIs();
571567
} );
572568

573569
// Search Data

0 commit comments

Comments
 (0)