mirror of
https://github.com/ppy/osu.git
synced 2026-05-13 20:33:35 +08:00
Fix editor not updating titlebar with new difficulty name after rename (#36908)
This commit is contained in:
committed by
GitHub
Unverified
parent
1b488949e1
commit
9105fc15b2
@@ -188,15 +188,14 @@ namespace osu.Game.Screens.Edit
|
||||
|
||||
private bool isNewBeatmap;
|
||||
|
||||
protected override UserActivity InitialActivity
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Beatmap.Value.Metadata.Author.OnlineID == api.LocalUser.Value.OnlineID)
|
||||
return new UserActivity.EditingBeatmap(Beatmap.Value.BeatmapInfo);
|
||||
protected override UserActivity InitialActivity => getCurrentUserActivity();
|
||||
|
||||
return new UserActivity.ModdingBeatmap(Beatmap.Value.BeatmapInfo);
|
||||
}
|
||||
private UserActivity getCurrentUserActivity()
|
||||
{
|
||||
if (Beatmap.Value.Metadata.Author.OnlineID == api.LocalUser.Value.OnlineID)
|
||||
return new UserActivity.EditingBeatmap(Beatmap.Value.BeatmapInfo);
|
||||
|
||||
return new UserActivity.ModdingBeatmap(Beatmap.Value.BeatmapInfo);
|
||||
}
|
||||
|
||||
protected override bool InitialBackButtonVisibility => false;
|
||||
@@ -604,6 +603,9 @@ namespace osu.Game.Screens.Edit
|
||||
updateLastSavedHash();
|
||||
onScreenDisplay?.Display(new BeatmapEditorToast(ToastStrings.BeatmapSaved, editorBeatmap.BeatmapInfo.GetDisplayTitle()));
|
||||
Saved?.Invoke();
|
||||
|
||||
// This triggers an update to the window title post-save (ie if the difficulty name changed).
|
||||
Activity.Value = getCurrentUserActivity();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user