Merge branch 'master' into fix-selection-changing

This commit is contained in:
Thomas Müller 2017-07-21 10:22:11 +02:00 committed by GitHub
commit 3a086534f8
2 changed files with 2 additions and 4 deletions

View File

@ -94,9 +94,7 @@ namespace osu.Game.Screens.Menu
{
if (!track.IsRunning)
{
track.Seek(metadata.PreviewTime);
if (metadata.PreviewTime == -1)
track.Seek(track.Length * 0.4f);
track.Seek(metadata.PreviewTime != -1 ? metadata.PreviewTime : 0.4f * track.Length);
track.Start();
}
}

View File

@ -25,7 +25,7 @@ namespace osu.Game.Screens.Play
return;
var firstHit = objects.First().StartTime;
var lastHit = (objects.Last() as IHasEndTime)?.EndTime ?? 0;
var lastHit = objects.Max(o => (o as IHasEndTime)?.EndTime ?? o.StartTime);
if (lastHit == 0)
lastHit = objects.Last().StartTime;