Tastudio branches - when removing the selected branch, clear the selection color
This commit is contained in:
parent
c969c57ee9
commit
0963c17206
|
@ -146,13 +146,20 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
if (SelectedBranch != null)
|
||||
{
|
||||
if (Branches.IndexOf(SelectedBranch) == CurrentBranch)
|
||||
int index = Branches.IndexOf(SelectedBranch);
|
||||
if (index == CurrentBranch)
|
||||
{
|
||||
CurrentBranch = -1;
|
||||
}
|
||||
|
||||
Branches.Remove(SelectedBranch);
|
||||
BranchView.RowCount = Branches.Count;
|
||||
|
||||
if (index == BranchView.SelectedRows.FirstOrDefault())
|
||||
{
|
||||
BranchView.ClearSelectedRows();
|
||||
}
|
||||
|
||||
BranchView.Refresh();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -840,6 +840,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
public void ClearSelectedRows()
|
||||
{
|
||||
SelectedItems.Clear();
|
||||
}
|
||||
|
||||
public IEnumerable<ToolStripItem> GenerateContextMenuItems()
|
||||
{
|
||||
yield return new ToolStripSeparator();
|
||||
|
|
Loading…
Reference in New Issue