From 226fcbb8292e3d5f49a34a6707f8e1e9a7040c55 Mon Sep 17 00:00:00 2001 From: adelikat Date: Tue, 4 Aug 2015 21:45:11 -0400 Subject: [PATCH] Tastudio - when showing branch number on a frame and there are multiple branches, grab the most recent by timestamp --- BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs index 9bd053eb01..0c044bef1e 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs @@ -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();