mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 11:32:54 +08:00
Add confirmation before saving for external edit
This commit is contained in:
parent
cd6b0e875a
commit
599a765fd1
@ -1134,13 +1134,29 @@ namespace osu.Game.Screens.Edit
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void editExternally()
|
private void editExternally()
|
||||||
|
{
|
||||||
|
if (HasUnsavedChanges)
|
||||||
|
{
|
||||||
|
dialogOverlay.Push(new SaveRequiredPopupDialog(() => attemptMutationOperation(() =>
|
||||||
{
|
{
|
||||||
if (!Save())
|
if (!Save())
|
||||||
return;
|
return false;
|
||||||
|
|
||||||
|
startEdit();
|
||||||
|
return true;
|
||||||
|
})));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
startEdit();
|
||||||
|
}
|
||||||
|
|
||||||
|
void startEdit()
|
||||||
|
{
|
||||||
var editOperation = beatmapManager.BeginExternalEditing(editorBeatmap.BeatmapInfo.BeatmapSet!);
|
var editOperation = beatmapManager.BeginExternalEditing(editorBeatmap.BeatmapInfo.BeatmapSet!);
|
||||||
this.Push(new ExternalEditScreen(editOperation, this));
|
this.Push(new ExternalEditScreen(editOperation, this));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void exportBeatmap(bool legacy)
|
private void exportBeatmap(bool legacy)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user