mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Ensure EditorBeatmap.Update
is called inside PerformOnSelection
calls
This commit is contained in:
@ -69,7 +69,11 @@ namespace osu.Game.Rulesets.Taiko.Edit
|
|||||||
{
|
{
|
||||||
EditorBeatmap.PerformOnSelection(h =>
|
EditorBeatmap.PerformOnSelection(h =>
|
||||||
{
|
{
|
||||||
if (h is Hit taikoHit) taikoHit.Type = state ? HitType.Rim : HitType.Centre;
|
if (h is Hit taikoHit)
|
||||||
|
{
|
||||||
|
taikoHit.Type = state ? HitType.Rim : HitType.Centre;
|
||||||
|
EditorBeatmap.Update(h);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,7 +77,13 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
double offset = result.Time.Value - blueprints.First().Item.StartTime;
|
double offset = result.Time.Value - blueprints.First().Item.StartTime;
|
||||||
|
|
||||||
if (offset != 0)
|
if (offset != 0)
|
||||||
Beatmap.PerformOnSelection(obj => obj.StartTime += offset);
|
{
|
||||||
|
Beatmap.PerformOnSelection(obj =>
|
||||||
|
{
|
||||||
|
obj.StartTime += offset;
|
||||||
|
Beatmap.Update(obj);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -125,6 +125,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
h.Samples.Add(new HitSampleInfo(sampleName));
|
h.Samples.Add(new HitSampleInfo(sampleName));
|
||||||
|
EditorBeatmap.Update(h);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -134,7 +135,11 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
/// <param name="sampleName">The name of the hit sample.</param>
|
/// <param name="sampleName">The name of the hit sample.</param>
|
||||||
public void RemoveHitSample(string sampleName)
|
public void RemoveHitSample(string sampleName)
|
||||||
{
|
{
|
||||||
EditorBeatmap.PerformOnSelection(h => h.SamplesBindable.RemoveAll(s => s.Name == sampleName));
|
EditorBeatmap.PerformOnSelection(h =>
|
||||||
|
{
|
||||||
|
h.SamplesBindable.RemoveAll(s => s.Name == sampleName);
|
||||||
|
EditorBeatmap.Update(h);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -276,7 +276,11 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
var timingPoint = EditorBeatmap.ControlPointInfo.TimingPointAt(selected.First().StartTime);
|
var timingPoint = EditorBeatmap.ControlPointInfo.TimingPointAt(selected.First().StartTime);
|
||||||
double adjustment = timingPoint.BeatLength / EditorBeatmap.BeatDivisor * amount;
|
double adjustment = timingPoint.BeatLength / EditorBeatmap.BeatDivisor * amount;
|
||||||
|
|
||||||
EditorBeatmap.PerformOnSelection(h => h.StartTime += adjustment);
|
EditorBeatmap.PerformOnSelection(h =>
|
||||||
|
{
|
||||||
|
h.StartTime += adjustment;
|
||||||
|
EditorBeatmap.Update(h);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user