diff --git a/src/BizHawk.Client.Common/movie/tasproj/TasMovie.History.cs b/src/BizHawk.Client.Common/movie/tasproj/TasMovie.History.cs index fc876ea73e..84e190ae88 100644 --- a/src/BizHawk.Client.Common/movie/tasproj/TasMovie.History.cs +++ b/src/BizHawk.Client.Common/movie/tasproj/TasMovie.History.cs @@ -8,7 +8,6 @@ namespace BizHawk.Client.Common { List Names { get; } int UndoIndex { get; } - string NextUndoStepName { get; } /// /// Gets or sets a value indicating whether the movie is recording action history. /// This is not intended to turn off the ChangeLog, but to disable the normal recording process. @@ -226,19 +225,6 @@ namespace BizHawk.Client.Common public bool CanUndo => UndoIndex > -1; public bool CanRedo => UndoIndex < _history.Count - 1; - public string NextUndoStepName - { - get - { - if (Names.Count == 0 || UndoIndex < 0) - { - return null; - } - - return Names[UndoIndex]; - } - } - private void AddMovieAction(string name) { if (UndoIndex + 1 != _history.Count) diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs index 6d7dd4c218..fdf16ba064 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs @@ -852,11 +852,18 @@ namespace BizHawk.Client.EmuHawk RefreshDialog(); return true; } - else if (TasView.RowCount != CurrentTasMovie.InputLogLength + 1) + else { - // Row count must always be kept up to date even if last row is not directly visible. - TasView.RowCount = CurrentTasMovie.InputLogLength + 1; - return true; + if (_undoForm != null && !_undoForm.IsDisposed) + { + _undoForm.UpdateValues(); + } + if (TasView.RowCount != CurrentTasMovie.InputLogLength + 1) + { + // Row count must always be kept up to date even if last row is not directly visible. + TasView.RowCount = CurrentTasMovie.InputLogLength + 1; + return true; + } } } diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/UndoHistoryForm.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/UndoHistoryForm.cs index 59591e964d..95bf90031d 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/UndoHistoryForm.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/UndoHistoryForm.cs @@ -10,7 +10,7 @@ namespace BizHawk.Client.EmuHawk private const string UndoColumnName = "Undo Step"; private readonly TAStudio _tastudio; - private string _lastUndoAction; + private int _lastUndoAction; private IMovieChangeLog Log => _tastudio.CurrentTasMovie.ChangeLog; public UndoHistoryForm(TAStudio owner) @@ -50,14 +50,14 @@ namespace BizHawk.Client.EmuHawk public void UpdateValues() { HistoryView.RowCount = Log.Names.Count; - if (AutoScrollCheck.Checked && _lastUndoAction != Log.NextUndoStepName) + if (AutoScrollCheck.Checked && _lastUndoAction != Log.UndoIndex) { - HistoryView.ScrollToIndex(Log.UndoIndex); + HistoryView.ScrollToIndex(Math.Max(Log.UndoIndex, 0)); HistoryView.DeselectAll(); HistoryView.SelectRow(Log.UndoIndex - 1, true); } - _lastUndoAction = Log.NextUndoStepName; + _lastUndoAction = Log.UndoIndex; HistoryView.Refresh(); }