diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs index 50fb8f9c17..9984409560 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/InputRoll.cs @@ -1316,8 +1316,16 @@ namespace BizHawk.Client.EmuHawk } else { + var hadIndex = SelectedItems.Any(); SelectedItems.Clear(); SelectCell(CurrentCell); + + // In this case the SelectCell did not invoke the change event since there was nothing to select + // But we went from selected to unselected, that is a change, so catch it here + if (hadIndex && CurrentCell.RowIndex.HasValue && CurrentCell.RowIndex > RowCount) + { + SelectedIndexChanged(this, new EventArgs()); + } } Refresh(); diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.cs index 42b691fd65..5f7c952d3e 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.cs @@ -113,7 +113,7 @@ namespace BizHawk.Client.EmuHawk private void MarkerView_SelectedIndexChanged(object sender, EventArgs e) { - RemoveBtn.Enabled = SelectedIndices.Any(i => i < Tastudio.CurrentTasMovie.Markers.Count); + RemoveBtn.Enabled = MarkerView.SelectedRows.Any(i => i < Tastudio.CurrentTasMovie.Markers.Count); } private void RemoveBtn_Click(object sender, EventArgs e) @@ -123,20 +123,11 @@ namespace BizHawk.Client.EmuHawk MarkerView_SelectedIndexChanged(sender, e); } - private IEnumerable SelectedIndices - { - get - { - return MarkerView.SelectedRows - .OfType(); - } - } - private List SelectedMarkers { get { - return SelectedIndices + return MarkerView.SelectedRows .Select(index => Tastudio.CurrentTasMovie.Markers[index]) .ToList(); }