tastudio: update RowCount before scrolling to frame.

fixes loading a branch whose movie length is longer than current.
This commit is contained in:
feos 2015-10-25 20:24:33 +03:00
parent 19add0ec93
commit a4b3a57af2
3 changed files with 7 additions and 4 deletions

View File

@ -743,7 +743,9 @@ namespace BizHawk.Client.EmuHawk
return (index >= FirstVisibleRow) && (index <= LastFullyVisibleRow);
}
public bool IsPartiallyVisible(int index)
{ return (index >= FirstVisibleRow) && (index <= LastVisibleRow); }
{
return (index >= FirstVisibleRow) && (index <= LastVisibleRow);
}
/// <summary>
/// Gets the number of rows currently visible including partially visible rows.

View File

@ -145,7 +145,7 @@ namespace BizHawk.Client.EmuHawk
if (SelectedBranch != null)
{
int index = BranchView.SelectedRows.First();
//if (Movie.CurrentBranchCurrentBranch == index) // if the current branch was edited, we should allow loading it. some day there might be a proper check
//if (Movie.CurrentBranch == index) // if the current branch was edited, we should allow loading it. some day there might be a proper check
// return;
Movie.CurrentBranch = index;
LoadBranch(SelectedBranch);

View File

@ -39,14 +39,15 @@ namespace BizHawk.Client.EmuHawk
if (AutoadjustInputMenuItem.Checked)
refreshNeeded = AutoAdjustInput();
if (TasView.RowCount != CurrentTasMovie.InputLogLength + 1)
TasView.RowCount = CurrentTasMovie.InputLogLength + 1;
MaybeFollowCursor();
if (TasView.IsPartiallyVisible(Global.Emulator.Frame) || TasView.IsPartiallyVisible(lastRefresh))
refreshNeeded = true;
RefreshDialog(refreshNeeded);
if (!refreshNeeded && TasView.RowCount != CurrentTasMovie.InputLogLength + 1) // Perhaps not the best place to put this.
TasView.RowCount = CurrentTasMovie.InputLogLength + 1;
}
public void FastUpdate()