diff --git a/osu.Game.Tests/Visual/Editing/TestSceneEditorBeatmapCreation.cs b/osu.Game.Tests/Visual/Editing/TestSceneEditorBeatmapCreation.cs
index 31348c1e17..a14c9aded3 100644
--- a/osu.Game.Tests/Visual/Editing/TestSceneEditorBeatmapCreation.cs
+++ b/osu.Game.Tests/Visual/Editing/TestSceneEditorBeatmapCreation.cs
@@ -109,6 +109,7 @@ namespace osu.Game.Tests.Visual.Editing
&& set != null
&& set.PerformRead(s => s.Beatmaps.Single().ID == beatmap.ID);
});
+ AddAssert("can save again", () => Editor.Save());
AddStep("create new difficulty", () => Editor.CreateNewDifficulty(new OsuRuleset().RulesetInfo));
AddUntilStep("wait for created", () =>
diff --git a/osu.Game/Screens/Edit/Editor.cs b/osu.Game/Screens/Edit/Editor.cs
index 64b23ccda8..78c5c862f7 100644
--- a/osu.Game/Screens/Edit/Editor.cs
+++ b/osu.Game/Screens/Edit/Editor.cs
@@ -378,12 +378,16 @@ namespace osu.Game.Screens.Edit
Clipboard.Content.Value = state.ClipboardContent;
});
- protected void Save()
+ ///
+ /// Saves the currently edited beatmap.
+ ///
+ /// Whether the save was successful.
+ protected bool Save()
{
if (!canSave)
{
notifications?.Post(new SimpleErrorNotification { Text = "Saving is not supported for this ruleset yet, sorry!" });
- return;
+ return false;
}
try
@@ -395,12 +399,13 @@ namespace osu.Game.Screens.Edit
{
// can fail e.g. due to duplicated difficulty names.
Logger.Error(ex, ex.Message);
- return;
+ return false;
}
// no longer new after first user-triggered save.
isNewBeatmap = false;
updateLastSavedHash();
+ return true;
}
protected override void Update()
@@ -809,7 +814,7 @@ namespace osu.Game.Screens.Edit
{
var fileMenuItems = new List