Tastudio - show branch numbers on the navigation column for frames that correspond to branches

This commit is contained in:
adelikat 2015-07-29 19:45:51 -04:00
parent e6fdac6923
commit 23b1199bbd
2 changed files with 8 additions and 2 deletions

View File

@ -223,8 +223,9 @@ namespace BizHawk.Client.EmuHawk
var branch = CreateBranch(); var branch = CreateBranch();
Branches.Add(branch); Branches.Add(branch);
BranchView.RowCount = Branches.Count; BranchView.RowCount = Branches.Count;
CurrentBranch = Branches.IndexOf(branch); CurrentBranch = Branches.IndexOf(branch);
BranchView.Refresh(); BranchView.Refresh();
Tastudio.RefreshDialog();
} }
private TasBranch CreateBranch() private TasBranch CreateBranch()

View File

@ -196,7 +196,12 @@ namespace BizHawk.Client.EmuHawk
if (columnName == CursorColumnName) if (columnName == CursorColumnName)
{ {
// Do nothing // TODO: what logic should we have when there is more than 1?
var branch = CurrentTasMovie.TasBranches.FirstOrDefault(x => x.Frame == index);
if (branch != null)
{
text = CurrentTasMovie.TasBranches.IndexOf(branch).ToString();
}
} }
else if (columnName == FrameColumnName) else if (columnName == FrameColumnName)
{ {