Fix ZoomableScrollContainer attempting to update zoom with overlapping range

This commit is contained in:
Salman Ahmed
2022-06-15 05:19:51 +03:00
parent 850afcb1c3
commit 268a7e1334

View File

@ -66,8 +66,9 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
minZoom = value;
if (Zoom < value)
Zoom = value;
// ensure zoom range is in valid state before updating zoom.
if (MinZoom < MaxZoom)
Zoom = Zoom;
}
}
@ -86,8 +87,9 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
maxZoom = value;
if (Zoom > value)
Zoom = value;
// ensure zoom range is in valid state before updating zoom.
if (MaxZoom > MinZoom)
Zoom = Zoom;
}
}