Skip to content

Commit

Permalink
Merge pull request #243 from stanriders/recreate-calculators
Browse files Browse the repository at this point in the history
Recreate difficulty calculator when changing mods to guarantee DHOs update
  • Loading branch information
smoogipoo authored Jan 16, 2025
2 parents 262dfa2 + be8b743 commit 8929399
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion PerformanceCalculatorGUI/Screens/SimulateScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -579,13 +579,17 @@ private void modsChanged(ValueChangedEvent<IReadOnlyList<Mod>> mods)

updateMissesTextboxes();

// recreate calculators to update DHOs
createCalculators();

modSettingChangeTracker = new ModSettingChangeTracker(mods.NewValue);
modSettingChangeTracker.SettingChanged += m =>
{
updateMissesTextboxes();
debouncedStatisticsUpdate?.Cancel();
debouncedStatisticsUpdate = Scheduler.AddDelayed(() =>
{
createCalculators();
updateMissesTextboxes();
calculateDifficulty();
calculatePerformance();
}, 100);
Expand Down

0 comments on commit 8929399

Please sign in to comment.