Tastudio - fix bug in setting visible frame logic when editing above the current frame

This commit is contained in:
adelikat 2014-09-25 01:38:01 +00:00
parent e9e9f574da
commit 8adc241d08
2 changed files with 11 additions and 8 deletions

View File

@ -74,15 +74,18 @@ namespace BizHawk.Client.EmuHawk
return true; return true;
} }
private void SetVisibleIndex() private void SetVisibleIndex(int? indexThatMustBeVisible = null)
{ {
int indexThatMustBeVisible = _currentTasMovie.IsRecording if (!indexThatMustBeVisible.HasValue)
? _currentTasMovie.InputLogLength
: Global.Emulator.Frame + 1;
if (!TasView.IsVisible(indexThatMustBeVisible))
{ {
TasView.LastVisibleRow = indexThatMustBeVisible; indexThatMustBeVisible = _currentTasMovie.IsRecording
? _currentTasMovie.InputLogLength
: Global.Emulator.Frame + 1;
}
if (!TasView.IsVisible(indexThatMustBeVisible.Value))
{
TasView.LastVisibleRow = indexThatMustBeVisible.Value;
} }
} }
} }

View File

@ -310,7 +310,7 @@ namespace BizHawk.Client.EmuHawk
} }
GlobalWin.DisplayManager.NeedsToPaint = true; GlobalWin.DisplayManager.NeedsToPaint = true;
TasView.LastVisibleRow = frame; SetVisibleIndex(frame);
} }
else // Get as close as we can then emulate there else // Get as close as we can then emulate there
{ {