diff --git a/Race_Element.HUD.ACC/Overlays/Driving/FuelInfo/FuelInfoOverlay.cs b/Race_Element.HUD.ACC/Overlays/Driving/FuelInfo/FuelInfoOverlay.cs index fa4118188..2bcf00b16 100644 --- a/Race_Element.HUD.ACC/Overlays/Driving/FuelInfo/FuelInfoOverlay.cs +++ b/Race_Element.HUD.ACC/Overlays/Driving/FuelInfo/FuelInfoOverlay.cs @@ -99,8 +99,7 @@ public sealed override bool ShouldRender() public sealed override void Render(Graphics g) { - using Brush fuelBarBrush = GetFuelBarBrush(); - Brush fuelTimeBrush = null; + Brush fuelBarBrush = GetFuelBarBrush(); _infoPanel.AddProgressBarWithCenteredText($"{pagePhysics.Fuel:F2} L", 0, pageStatic.MaxFuel, pagePhysics.Fuel, fuelBarBrush); // Some global variants double lapBufferVar = pageGraphics.FuelXLap * this._config.InfoPanel.FuelBufferLaps; @@ -130,7 +129,7 @@ public sealed override void Render(Graphics g) string fuelTime = $"{TimeSpan.FromMilliseconds(fuelTimeLeft):hh\\:mm\\:ss}"; string stintTime = $"{TimeSpan.FromMilliseconds(stintDebug):hh\\:mm\\:ss}"; //********************** - fuelTimeBrush = GetFuelTimeBrush(fuelTimeLeft, stintDebug); + Brush fuelTimeBrush = GetFuelTimeBrush(fuelTimeLeft, stintDebug); //Start (Basic) _infoPanel.AddLine("Laps Left", $"{pageGraphics.FuelEstimatedLaps:F1} @ {pageGraphics.FuelXLap:F2}L"); _infoPanel.AddLine("Fuel-End", $"{fuelToEnd + lapBufferVar:F1} : Add {fuelToAdd:F0}"); @@ -151,7 +150,7 @@ public sealed override void Render(Graphics g) //Magic End (Advanced) drawPanel: _infoPanel.Draw(g); - fuelTimeBrush?.Dispose(); + //fuelTimeBrush?.Dispose(); } private double FuelToAdd(double lapBufferVar, double stintDebug, double stintFuel, double fuelToEnd) diff --git a/Race_Element/Controls/Info/ReleaseNotes.cs b/Race_Element/Controls/Info/ReleaseNotes.cs index 8a1557dc0..7f98dc925 100644 --- a/Race_Element/Controls/Info/ReleaseNotes.cs +++ b/Race_Element/Controls/Info/ReleaseNotes.cs @@ -6,6 +6,7 @@ public static class ReleaseNotes { internal readonly static Dictionary Notes = new() { + {"1.0.7.0", "- hotfix for fuel info hud, drawing things were disposed when they shouldn't have been." }, {"1.0.6.8", "- Fuel Info HUD:" + "\n - Now calculates laptimes above 3 minutes. It will also use your last lap as laptime if you don't haven't set a valid best lap yet." + "\n - No data will be shown if there are no known laptimes(best or last)."+ diff --git a/Race_Element/Race Element.csproj b/Race_Element/Race Element.csproj index f871f985b..87602cbd1 100644 --- a/Race_Element/Race Element.csproj +++ b/Race_Element/Race Element.csproj @@ -12,9 +12,9 @@ Race Element false true - 1.0.6.8 - 1.0.6.8 - 1.0.6.8 + 1.0.7.0 + 1.0.7.0 + 1.0.7.0 true true true