Add confirmation before saving for external edit

This commit is contained in:
Dean Herbert 2024-07-11 12:20:33 +09:00
parent cd6b0e875a
commit 599a765fd1
No known key found for this signature in database

View File

@ -1135,11 +1135,27 @@ namespace osu.Game.Screens.Edit
private void editExternally()
{
if (!Save())
return;
if (HasUnsavedChanges)
{
dialogOverlay.Push(new SaveRequiredPopupDialog(() => attemptMutationOperation(() =>
{
if (!Save())
return false;
var editOperation = beatmapManager.BeginExternalEditing(editorBeatmap.BeatmapInfo.BeatmapSet!);
this.Push(new ExternalEditScreen(editOperation, this));
startEdit();
return true;
})));
}
else
{
startEdit();
}
void startEdit()
{
var editOperation = beatmapManager.BeginExternalEditing(editorBeatmap.BeatmapInfo.BeatmapSet!);
this.Push(new ExternalEditScreen(editOperation, this));
}
}
private void exportBeatmap(bool legacy)