TAStudio:

-Bugfix: Didn't refresh when changing lag frames to hide.
-Bugfix: Another error with setting LastVisisbleFrame.
-Bugfix: Truncating a movie didn't remove truncated marker selection.
This commit is contained in:
SuuperW 2015-02-27 19:34:31 +00:00
parent 836659264d
commit c12d715c12
3 changed files with 32 additions and 32 deletions

View File

@ -383,6 +383,10 @@ namespace BizHawk.Client.EmuHawk
{ {
SelectedItems.Clear(); SelectedItems.Clear();
} }
public void TruncateSelection(int index)
{
SelectedItems.RemoveAll(cell => cell.RowIndex > index);
}
[Browsable(false)] [Browsable(false)]
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)] [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
@ -588,18 +592,21 @@ namespace BizHawk.Client.EmuHawk
else else
{ {
if (Math.Abs(LastFullyVisibleRow - value) > VisibleRows) // Big jump if (Math.Abs(LastFullyVisibleRow - value) > VisibleRows) // Big jump
{
FirstVisibleRow = Math.Max(value - (ExpectedDisplayRange() - HalfRow), 0); FirstVisibleRow = Math.Max(value - (ExpectedDisplayRange() - HalfRow), 0);
SetLagFramesArray();
}
// Small jump, more accurate // Small jump, more accurate
int lastVisible; int lastVisible = LastFullyVisibleRow;
do do
{ {
SetLagFramesArray();
lastVisible = LastFullyVisibleRow;
if ((lastVisible - value) / (LagFramesToHide + 1) != 0) if ((lastVisible - value) / (LagFramesToHide + 1) != 0)
FirstVisibleRow = Math.Max(FirstVisibleRow - ((lastVisible - value) / (LagFramesToHide + 1)), 0); FirstVisibleRow = Math.Max(FirstVisibleRow - ((lastVisible - value) / (LagFramesToHide + 1)), 0);
else else
FirstVisibleRow -= Math.Sign(lastVisible - value); FirstVisibleRow -= Math.Sign(lastVisible - value);
SetLagFramesArray();
lastVisible = LastFullyVisibleRow;
} while ((lastVisible - value < 0 || lastVisible - value > lagFrames[VisibleRows]) && FirstVisibleRow != 0); } while ((lastVisible - value < 0 || lastVisible - value > lagFrames[VisibleRows]) && FirstVisibleRow != 0);
System.Diagnostics.Debug.Print("Jumped to: " + value + " (" + LastFullyVisibleRow + ")"); System.Diagnostics.Debug.Print("Jumped to: " + value + " (" + LastFullyVisibleRow + ")");

View File

@ -680,34 +680,36 @@ namespace BizHawk.Client.EmuHawk
this.HideLagFrames0.CheckOnClick = true; this.HideLagFrames0.CheckOnClick = true;
this.HideLagFrames0.CheckState = System.Windows.Forms.CheckState.Checked; this.HideLagFrames0.CheckState = System.Windows.Forms.CheckState.Checked;
this.HideLagFrames0.Name = "HideLagFrames0"; this.HideLagFrames0.Name = "HideLagFrames0";
this.HideLagFrames0.Size = new System.Drawing.Size(131, 22); this.HideLagFrames0.Size = new System.Drawing.Size(152, 22);
this.HideLagFrames0.Tag = ""; this.HideLagFrames0.Tag = 0;
this.HideLagFrames0.Text = "Don\'t Hide"; this.HideLagFrames0.Text = "Don\'t Hide";
this.HideLagFrames0.Click += new System.EventHandler(this.HideLagFrames0_Click); this.HideLagFrames0.Click += new System.EventHandler(this.HideLagFramesX_Click);
// //
// HideLagFrames1 // HideLagFrames1
// //
this.HideLagFrames1.CheckOnClick = true; this.HideLagFrames1.CheckOnClick = true;
this.HideLagFrames1.Name = "HideLagFrames1"; this.HideLagFrames1.Name = "HideLagFrames1";
this.HideLagFrames1.Size = new System.Drawing.Size(131, 22); this.HideLagFrames1.Size = new System.Drawing.Size(152, 22);
this.HideLagFrames1.Tag = 1;
this.HideLagFrames1.Text = "1 (30 fps)"; this.HideLagFrames1.Text = "1 (30 fps)";
this.HideLagFrames1.Click += new System.EventHandler(this.HideLagFrames1_Click); this.HideLagFrames1.Click += new System.EventHandler(this.HideLagFramesX_Click);
// //
// HideLagFrames2 // HideLagFrames2
// //
this.HideLagFrames2.Name = "HideLagFrames2"; this.HideLagFrames2.Name = "HideLagFrames2";
this.HideLagFrames2.Size = new System.Drawing.Size(131, 22); this.HideLagFrames2.Size = new System.Drawing.Size(152, 22);
this.HideLagFrames2.Tag = 2;
this.HideLagFrames2.Text = "2 (20 fps)"; this.HideLagFrames2.Text = "2 (20 fps)";
this.HideLagFrames2.Click += new System.EventHandler(this.HideLagFrames2_Click); this.HideLagFrames2.Click += new System.EventHandler(this.HideLagFramesX_Click);
// //
// HideLagFrames3 // HideLagFrames3
// //
this.HideLagFrames3.CheckOnClick = true; this.HideLagFrames3.CheckOnClick = true;
this.HideLagFrames3.Name = "HideLagFrames3"; this.HideLagFrames3.Name = "HideLagFrames3";
this.HideLagFrames3.Size = new System.Drawing.Size(131, 22); this.HideLagFrames3.Size = new System.Drawing.Size(152, 22);
this.HideLagFrames3.Tag = ""; this.HideLagFrames3.Tag = 3;
this.HideLagFrames3.Text = "3 (15fps)"; this.HideLagFrames3.Text = "3 (15fps)";
this.HideLagFrames3.Click += new System.EventHandler(this.HideLagFrames3_Click); this.HideLagFrames3.Click += new System.EventHandler(this.HideLagFramesX_Click);
// //
// ColumnsSubMenu // ColumnsSubMenu
// //
@ -1171,8 +1173,8 @@ namespace BizHawk.Client.EmuHawk
private System.Windows.Forms.ToolStripSeparator StartFromNowSeparator; private System.Windows.Forms.ToolStripSeparator StartFromNowSeparator;
private System.Windows.Forms.ToolStripMenuItem StartNewProjectFromNowMenuItem; private System.Windows.Forms.ToolStripMenuItem StartNewProjectFromNowMenuItem;
private System.Windows.Forms.ToolStripMenuItem RotateMenuItem; private System.Windows.Forms.ToolStripMenuItem RotateMenuItem;
private System.Windows.Forms.ToolStripProgressBar SavingProgressBar; private System.Windows.Forms.ToolStripProgressBar SavingProgressBar;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel2; private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel2;
private System.Windows.Forms.ToolStripMenuItem HideLagFramesSubMenu; private System.Windows.Forms.ToolStripMenuItem HideLagFramesSubMenu;
private System.Windows.Forms.ToolStripMenuItem HideLagFrames3; private System.Windows.Forms.ToolStripMenuItem HideLagFrames3;
private System.Windows.Forms.ToolStripMenuItem HideLagFrames0; private System.Windows.Forms.ToolStripMenuItem HideLagFrames0;

View File

@ -486,6 +486,7 @@ namespace BizHawk.Client.EmuHawk
var needsToRollback = !(rollbackFrame > Emulator.Frame); var needsToRollback = !(rollbackFrame > Emulator.Frame);
CurrentTasMovie.Truncate(rollbackFrame); CurrentTasMovie.Truncate(rollbackFrame);
MarkerControl.MarkerInputRoll.TruncateSelection(CurrentTasMovie.Markers.Count - 1);
if (needsToRollback) if (needsToRollback)
{ {
@ -636,24 +637,14 @@ namespace BizHawk.Client.EmuHawk
CurrentTasMovie.FlagChanges(); CurrentTasMovie.FlagChanges();
} }
private void HideLagFrames0_Click(object sender, EventArgs e) private void HideLagFramesX_Click(object sender, EventArgs e)
{ {
TasView.LagFramesToHide = 0; TasView.LagFramesToHide = (int)(sender as ToolStripMenuItem).Tag;
} if (TasPlaybackBox.FollowCursor)
{
private void HideLagFrames1_Click(object sender, EventArgs e) SetVisibleIndex();
{ }
TasView.LagFramesToHide = 1; RefreshDialog();
}
private void HideLagFrames2_Click(object sender, EventArgs e)
{
TasView.LagFramesToHide = 2;
}
private void HideLagFrames3_Click(object sender, EventArgs e)
{
TasView.LagFramesToHide = 3;
} }
#endregion #endregion