Skip to content

Commit

Permalink
Update drawing when link cache changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Elscrux committed May 17, 2024
1 parent f21ed40 commit fc8cbe4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Plugins/MapperPlugin/ViewModels/MapperVM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,6 @@ public MapperVM(
SavedMaps.RemoveWhere(x => x.Id == id.Id);
});

LinkCacheProvider.LinkCacheChanged
.Subscribe(_ => HeatmapCreator.ClearCache());

// Logical update
var logicalMappingUpdates = Mappings
.WhenCollectionChanges()
Expand All @@ -123,7 +120,10 @@ public MapperVM(

this.WhenAnyValue(x => x.WorldspaceFormKey)
.Where(worldspace => !worldspace.IsNull)
.CombineLatest(logicalMappingUpdates, (x, _) => x)
.CombineLatest(
logicalMappingUpdates,
LinkCacheProvider.LinkCacheChanged.Do(_ => HeatmapCreator.ClearCache()),
(x, _, _) => x)
.ThrottleMedium()
.ObserveOnGui()
.Do(_ => BusyTasks++)
Expand Down

0 comments on commit fc8cbe4

Please sign in to comment.