From 1070fceaa5fd73aca6143590f8aa8113a4c96b20 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sat, 25 Jul 2015 12:07:22 -0400 Subject: [PATCH] Tastudio Branches - when removing the current branch, clear the CurrentBranch flag --- .../tools/TAStudio/BookmarksBranchesBox.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs index 685b6d90a9..3abade72d0 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/BookmarksBranchesBox.cs @@ -160,6 +160,11 @@ namespace BizHawk.Client.EmuHawk { if (SelectedBranch != null) { + if (Branches.IndexOf(SelectedBranch) == CurrentBranch) + { + CurrentBranch = -1; + } + Branches.Remove(SelectedBranch); BranchView.RowCount = Branches.Count; BranchView.Refresh();