TAStudio: -History form's Auto Scroll now scrolls to current undo step instead of the last item in the list

-Allow user to cancel setting wheel scroll speed
This commit is contained in:
Suuper 2015-07-25 20:30:16 -05:00
parent b78f5802a3
commit 7a0103963d
2 changed files with 9 additions and 7 deletions

View File

@ -858,9 +858,11 @@ namespace BizHawk.Client.EmuHawk
inputpromt.TextInputType = InputPrompt.InputType.Unsigned;
inputpromt.Message = "Frames per tick:";
inputpromt.InitialValue = TasView.ScrollSpeed.ToString();
inputpromt.ShowDialog();
TasView.ScrollSpeed = int.Parse(inputpromt.PromptText);
Settings.ScrollSpeed = TasView.ScrollSpeed;
if (inputpromt.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
TasView.ScrollSpeed = int.Parse(inputpromt.PromptText);
Settings.ScrollSpeed = TasView.ScrollSpeed;
}
}

View File

@ -49,13 +49,13 @@ namespace BizHawk.Client.EmuHawk
color = Color.Red;
}
private int _lastCount = -1;
private int _lastIndex = -1;
public void UpdateValues()
{
HistoryView.ItemCount = log.Names.Count;
if (AutoScrollCheck.Checked && _lastCount != HistoryView.ItemCount)
HistoryView.ensureVisible(HistoryView.ItemCount - 1);
_lastCount = HistoryView.ItemCount;
if (AutoScrollCheck.Checked && _lastIndex != log.UndoIndex)
HistoryView.ensureVisible(log.UndoIndex - 1);
_lastIndex = log.UndoIndex;
HistoryView.Refresh();
}