Cleanup some more TAStudio function calls
in an ongoing effort to try and make the logic understandable
This should also restore default columns now when an existing tasmovie is currently loaded with column changes
and an existing bk2 is opened (which is then converted to a tasproj) (possible after 2ad7fc095c
)
This commit is contained in:
parent
2ad7fc095c
commit
bccc118091
|
@ -666,6 +666,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
_columns = rollSettings.Columns;
|
||||
_columns.ChangedCallback = ColumnChangedCallback;
|
||||
_columns.ColumnsChanged();
|
||||
HorizontalOrientation = rollSettings.HorizontalOrientation;
|
||||
LagFramesToHide = rollSettings.LagFramesToHide;
|
||||
HideWasLagFrames = rollSettings.HideWasLagFrames;
|
||||
|
|
|
@ -1282,16 +1282,14 @@ namespace BizHawk.Client.EmuHawk
|
|||
ColumnsSubMenu.DropDownItems.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
TasView.AllColumns.ColumnsChanged();
|
||||
}
|
||||
|
||||
// ReSharper disable once UnusedMember.Local
|
||||
[RestoreDefaults]
|
||||
private void RestoreDefaults()
|
||||
{
|
||||
TasView.AllColumns.Clear();
|
||||
SetUpColumns();
|
||||
SetUpToolStripColumns();
|
||||
TasView.Refresh();
|
||||
CurrentTasMovie.FlagChanges();
|
||||
|
||||
|
|
|
@ -217,8 +217,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
MainForm.PauseOnFrame = null;
|
||||
MainForm.PauseEmulator();
|
||||
|
||||
SetupBoolPatterns();
|
||||
|
||||
// Nag if inaccurate core, but not if auto-loading or movie is already loaded
|
||||
if (!CanAutoload && MovieSession.Movie.NotActive())
|
||||
{
|
||||
|
@ -249,7 +247,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
ConvertCurrentMovieToTasproj();
|
||||
_ = StartNewMovieWrapper(CurrentTasMovie, isNew: false);
|
||||
SetUpColumns();
|
||||
}
|
||||
|
||||
// Start Scenario 2: A tasproj is already active
|
||||
|
@ -258,7 +255,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
bool result = LoadMovie(CurrentTasMovie, gotoFrame: Emulator.Frame);
|
||||
if (!result)
|
||||
{
|
||||
TasView.AllColumns.Clear();
|
||||
StartNewTasMovie();
|
||||
}
|
||||
}
|
||||
|
@ -400,7 +396,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
|
||||
TasView.AllColumns.ColumnsChanged();
|
||||
SetupBoolPatterns();
|
||||
}
|
||||
|
||||
private void SetupBoolPatterns()
|
||||
|
@ -436,8 +431,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
AxisPatterns[AxisPatterns.Length - 2] = new([ 1 ]);
|
||||
AxisPatterns[AxisPatterns.Length - 1] = new(1, Config.AutofireOn, 0, Config.AutofireOff);
|
||||
|
||||
SetUpToolStripColumns();
|
||||
}
|
||||
|
||||
/// <remarks>for Lua</remarks>
|
||||
|
@ -519,18 +512,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
GoToFrame(CurrentTasMovie.TasSession.CurrentFrame);
|
||||
}
|
||||
|
||||
// If we are loading an existing non-default movie, we will already have columns generated
|
||||
// Only set up columns if needed
|
||||
if (!TasView.AllColumns.Any())
|
||||
{
|
||||
SetUpColumns();
|
||||
}
|
||||
UpdateAutoFire();
|
||||
|
||||
SetUpToolStripColumns();
|
||||
|
||||
BookMarkControl.UpdateTextColumnWidth();
|
||||
MarkerControl.UpdateTextColumnWidth();
|
||||
// clear all selections
|
||||
TasView.DeselectAll();
|
||||
BookMarkControl.Restart();
|
||||
|
@ -559,9 +540,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
TasView.DeselectAll();
|
||||
BookMarkControl.Restart();
|
||||
MarkerControl.Restart();
|
||||
SetUpColumns();
|
||||
RefreshDialog();
|
||||
TasView.Refresh();
|
||||
}
|
||||
|
||||
private bool StartNewMovieWrapper(ITasMovie movie, bool isNew)
|
||||
|
@ -588,6 +567,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
TasView.LoadSettingsSerialized(CurrentTasMovie.InputRollSettings);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetUpColumns();
|
||||
}
|
||||
SetUpToolStripColumns();
|
||||
SetupBoolPatterns();
|
||||
UpdateAutoFire();
|
||||
}
|
||||
|
||||
_initializing = false;
|
||||
|
|
Loading…
Reference in New Issue