Fix some TAStudio branch view issues (#2686)

* Fix exception, scroll to branch on updating branch and fix #2645
* Make loadbranch hotkey deselect all but one branch
matches updatebranch behavior and fixes part of #2645
This commit is contained in:
Moritz Bender 2021-03-30 22:33:45 +02:00 committed by GitHub
parent ca8c7a5427
commit 6c2b72dd8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -317,7 +317,7 @@ namespace BizHawk.Client.EmuHawk
public bool FullRowSelect { get; set; }
/// <summary>
/// Gets or sets a value indicating whether multiple items can to be selected
/// Gets or sets a value indicating whether multiple items can be selected
/// </summary>
[Category("Behavior")]
[DefaultValue(true)]
@ -1569,7 +1569,7 @@ namespace BizHawk.Client.EmuHawk
CurrentCell = newCell;
if (PointedCellChanged != null &&
(_lastCell.Column != CurrentCell.Column || _lastCell.RowIndex != CurrentCell.RowIndex))
(_lastCell?.Column != CurrentCell.Column || _lastCell?.RowIndex != CurrentCell.RowIndex))
{
PointedCellChanged(this, new CellEventArgs(_lastCell, CurrentCell));
}

View File

@ -286,6 +286,7 @@ namespace BizHawk.Client.EmuHawk
toolTip1.SetToolTip(UndoBranchButton, "Undo Branch Update");
_branchUndo = BranchUndo.Update;
BranchView.ScrollToIndex(Branches.Current);
Branches.Replace(SelectedBranch, CreateBranch());
Tastudio.RefreshDialog();
SavedCallback?.Invoke(Branches.Current);
@ -420,6 +421,7 @@ namespace BizHawk.Client.EmuHawk
{
if (Branches[slot] != null)
{
BranchView.DeselectAll();
Select(slot, true);
}
else
@ -443,6 +445,7 @@ namespace BizHawk.Client.EmuHawk
{
if (Branches[slot] != null)
{
BranchView.DeselectAll();
Select(slot, true);
}
else