diff --git a/osu.Game/Database/RealmArchiveModelImporter.cs b/osu.Game/Database/RealmArchiveModelImporter.cs
index 6cea92f1d9..aa7fac07a8 100644
--- a/osu.Game/Database/RealmArchiveModelImporter.cs
+++ b/osu.Game/Database/RealmArchiveModelImporter.cs
@@ -338,11 +338,11 @@ namespace osu.Game.Database
// import to store
realm.Add(item);
+ PostImport(item, realm);
+
transaction.Commit();
}
- PostImport(item, realm);
-
LogForModel(item, @"Import successfully completed!");
}
catch (Exception e)
@@ -479,7 +479,7 @@ namespace osu.Game.Database
}
///
- /// Perform any final actions after the import has been committed to the database.
+ /// Perform any final actions before the import has been committed to the database.
///
/// The model prepared for import.
/// The current realm context.
diff --git a/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs b/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs
index bae25dc9f8..f5af110372 100644
--- a/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs
+++ b/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs
@@ -314,6 +314,9 @@ namespace osu.Game.Screens.OnlinePlay.Match
public override void OnSuspending(ScreenTransitionEvent e)
{
+ // Should be a noop in most cases, but let's ensure beyond doubt that the beatmap is in a correct state.
+ updateWorkingBeatmap();
+
onLeaving();
base.OnSuspending(e);
}
diff --git a/osu.Game/Screens/OnlinePlay/Multiplayer/Spectate/PlayerArea.cs b/osu.Game/Screens/OnlinePlay/Multiplayer/Spectate/PlayerArea.cs
index 5bae4f9ea5..302d04b531 100644
--- a/osu.Game/Screens/OnlinePlay/Multiplayer/Spectate/PlayerArea.cs
+++ b/osu.Game/Screens/OnlinePlay/Multiplayer/Spectate/PlayerArea.cs
@@ -53,9 +53,6 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
[CanBeNull]
public Score Score { get; private set; }
- [Resolved]
- private BeatmapManager beatmapManager { get; set; }
-
private readonly BindableDouble volumeAdjustment = new BindableDouble();
private readonly Container gameplayContent;
private readonly LoadingLayer loadingLayer;
@@ -84,6 +81,9 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
GameplayClock.Source = masterClock;
}
+ [Resolved]
+ private IBindable beatmap { get; set; }
+
public void LoadScore([NotNull] Score score)
{
if (Score != null)
@@ -91,7 +91,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Spectate
Score = score;
- gameplayContent.Child = new PlayerIsolationContainer(beatmapManager.GetWorkingBeatmap(Score.ScoreInfo.BeatmapInfo), Score.ScoreInfo.Ruleset, Score.ScoreInfo.Mods)
+ gameplayContent.Child = new PlayerIsolationContainer(beatmap.Value, Score.ScoreInfo.Ruleset, Score.ScoreInfo.Mods)
{
RelativeSizeAxes = Axes.Both,
Child = stack = new OsuScreenStack