1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 18:03:11 +08:00

Fix focused overlays not registering as such

Also fixes bug wherein opening skin editor at song select with mod
select open would show mod select on top of the skin editor.
This commit is contained in:
Bartłomiej Dach 2022-05-07 22:50:10 +02:00
parent bdea6d8654
commit a45ca2ad10
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

View File

@ -201,6 +201,10 @@ namespace osu.Game
externalOverlays.Add(overlayContainer);
overlayContent.Add(overlayContainer);
if (overlayContainer is OsuFocusedOverlayContainer focusedOverlayContainer)
focusedOverlays.Add(focusedOverlayContainer);
return new InvokeOnDisposal(() => unregisterBlockingOverlay(overlayContainer));
}
@ -223,6 +227,10 @@ namespace osu.Game
private void unregisterBlockingOverlay(OverlayContainer overlayContainer)
{
externalOverlays.Remove(overlayContainer);
if (overlayContainer is OsuFocusedOverlayContainer focusedOverlayContainer)
focusedOverlays.Remove(focusedOverlayContainer);
overlayContainer.Expire();
}