mirror of
https://github.com/ppy/osu
synced 2024-12-16 20:05:41 +00:00
Add confirmation before saving for external edit
This commit is contained in:
parent
cd6b0e875a
commit
599a765fd1
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user