Trace Logger: Fix exception when scrolling

This commit is contained in:
alyosha-tas 2019-07-05 10:06:00 -04:00
parent 275ccb381a
commit e9ca6f82bc
1 changed files with 6 additions and 2 deletions

View File

@ -133,7 +133,11 @@ namespace BizHawk.Client.EmuHawk
{
if (ToWindowRadio.Checked)
{
TraceView.VirtualListSize = _instructions.Count;
// setting to zero first fixes an exception when scrolling the view
// how or why I don't know
// it's hidden behind an internal class ListViewNativeItemCollection
TraceView.VirtualListSize = 0;
TraceView.VirtualListSize = _instructions.Count;
}
else
{
@ -148,7 +152,7 @@ namespace BizHawk.Client.EmuHawk
//connect tracer to sink for next frame
if (ToWindowRadio.Checked)
{
//update listview with most recentr results
//update listview with most recent results
TraceView.BlazingFast = !GlobalWin.MainForm.EmulatorPaused;
Tracer.Sink = new CallbackSink()