From 08e33f7ec15ff22a85cc334dbc56f1f713736768 Mon Sep 17 00:00:00 2001 From: feos Date: Sat, 23 Jun 2018 00:47:46 +0300 Subject: [PATCH] tastudio: make current branch track its new pos upon reordering --- BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs index 7d36eff285..3f5e344729 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs @@ -627,7 +627,11 @@ namespace BizHawk.Client.EmuHawk { if (e.NewCell != null && e.NewCell.IsDataCell && e.OldCell.RowIndex.Value < Movie.BranchCount) { + int currenthash = Movie.BranchHashByIndex(Movie.CurrentBranch); Movie.SwapBranches(e.OldCell.RowIndex.Value, e.NewCell.RowIndex.Value); + int newindex = Movie.BranchIndexByHash(currenthash); + Movie.CurrentBranch = newindex; + BranchView.SelectRow(newindex, true); } }