From 84efddcbc7cb09db82ccb58d2a57bd80c1b9c1fd Mon Sep 17 00:00:00 2001 From: timiimit Date: Tue, 9 May 2023 15:53:36 +0200 Subject: [PATCH] Fix default progress graph flipping with a hack --- osu.Game/Screens/Play/SquareGraph.cs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/osu.Game/Screens/Play/SquareGraph.cs b/osu.Game/Screens/Play/SquareGraph.cs index 57b7c84e89..8636f08b00 100644 --- a/osu.Game/Screens/Play/SquareGraph.cs +++ b/osu.Game/Screens/Play/SquareGraph.cs @@ -75,18 +75,28 @@ namespace osu.Game.Screens.Play private Vector2 previousDrawSize; + private Vector2 previousParentScale; + protected override void Update() { base.Update(); - if (graphNeedsUpdate || (values != null && DrawSize != previousDrawSize)) + bool hasFlipped = previousParentScale != Parent.Scale; + if (graphNeedsUpdate || (values != null && DrawSize != previousDrawSize) || hasFlipped) { - columns?.FadeOut(500, Easing.OutQuint).Expire(); - scheduledCreate?.Cancel(); - scheduledCreate = Scheduler.AddDelayed(RecreateGraph, 500); + + if (!hasFlipped) + { + scheduledCreate = Scheduler.AddDelayed(RecreateGraph, 500); + } + else + { + RecreateGraph(); + } previousDrawSize = DrawSize; + previousParentScale = Parent.Scale; graphNeedsUpdate = false; } }