Tastudio - when showing branch number on a frame and there are multiple branches, grab the most recent by timestamp

This commit is contained in:
adelikat 2015-08-04 21:45:11 -04:00
parent a686465911
commit 226fcbb829
1 changed files with 4 additions and 2 deletions

View File

@ -198,8 +198,10 @@ namespace BizHawk.Client.EmuHawk
if (columnName == CursorColumnName)
{
// TODO: what logic should we have when there is more than 1?
var branch = CurrentTasMovie.TasBranches.FirstOrDefault(x => x.Frame == index);
var branch = CurrentTasMovie.TasBranches
.Where(b => b.Frame == index)
.OrderByDescending(b => b.TimeStamp)
.FirstOrDefault();
if (branch != null)
{
text = CurrentTasMovie.TasBranches.IndexOf(branch).ToString();