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);
|
return (index >= FirstVisibleRow) && (index <= LastFullyVisibleRow);
|
||||||
}
|
}
|
||||||
public bool IsPartiallyVisible(int index)
|
public bool IsPartiallyVisible(int index)
|
||||||
{ return (index >= FirstVisibleRow) && (index <= LastVisibleRow); }
|
{
|
||||||
|
return (index >= FirstVisibleRow) && (index <= LastVisibleRow);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the number of rows currently visible including partially visible rows.
|
/// Gets the number of rows currently visible including partially visible rows.
|
||||||
|
|
|
@ -145,7 +145,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
if (SelectedBranch != null)
|
if (SelectedBranch != null)
|
||||||
{
|
{
|
||||||
int index = BranchView.SelectedRows.First();
|
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;
|
// return;
|
||||||
Movie.CurrentBranch = index;
|
Movie.CurrentBranch = index;
|
||||||
LoadBranch(SelectedBranch);
|
LoadBranch(SelectedBranch);
|
||||||
|
|
|
@ -39,14 +39,15 @@ namespace BizHawk.Client.EmuHawk
|
||||||
if (AutoadjustInputMenuItem.Checked)
|
if (AutoadjustInputMenuItem.Checked)
|
||||||
refreshNeeded = AutoAdjustInput();
|
refreshNeeded = AutoAdjustInput();
|
||||||
|
|
||||||
|
if (TasView.RowCount != CurrentTasMovie.InputLogLength + 1)
|
||||||
|
TasView.RowCount = CurrentTasMovie.InputLogLength + 1;
|
||||||
|
|
||||||
MaybeFollowCursor();
|
MaybeFollowCursor();
|
||||||
|
|
||||||
if (TasView.IsPartiallyVisible(Global.Emulator.Frame) || TasView.IsPartiallyVisible(lastRefresh))
|
if (TasView.IsPartiallyVisible(Global.Emulator.Frame) || TasView.IsPartiallyVisible(lastRefresh))
|
||||||
refreshNeeded = true;
|
refreshNeeded = true;
|
||||||
|
|
||||||
RefreshDialog(refreshNeeded);
|
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()
|
public void FastUpdate()
|
||||||
|
|
Loading…
Reference in New Issue