tastudio: update RowCount before scrolling to frame.
fixes loading a branch whose movie length is longer than current.
This commit is contained in:
parent
19add0ec93
commit
a4b3a57af2
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue