Skip to content

Commit

Permalink
Remove unnecessary duplicated actions in TAStudio
Browse files Browse the repository at this point in the history
this should not change any behavior.
  • Loading branch information
Morilli committed Jul 6, 2024
1 parent d161215 commit 4c39a81
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
15 changes: 6 additions & 9 deletions src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.IToolForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ protected override void FastUpdateAfter()

public override void Restart()
{
if (!IsHandleCreated || IsDisposed)
if (!IsActive)
{
return;
}
Expand All @@ -106,18 +106,15 @@ public override void Restart()

if (CurrentTasMovie != null)
{
if (Game.Hash != CurrentTasMovie.Hash || CurrentTasMovie.Filename != Settings.RecentTas.MostRecent)
TastudioStopMovie();
// try to load the most recent movie if it matches the currently loaded movie
if (Game.Hash == CurrentTasMovie.Hash && CurrentTasMovie.Filename == Settings.RecentTas.MostRecent)
{
TastudioStopMovie();
TasView.AllColumns.Clear();
StartNewTasMovie();
SetUpColumns();
TasView.Refresh();
LoadMostRecentOrStartNew();
}
else
{
TastudioStopMovie();
LoadMostRecentOrStartNew();
StartNewTasMovie();
}
}
}
Expand Down
1 change: 0 additions & 1 deletion src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,6 @@ private bool LoadFileWithFallback(string path)

if (!movieLoadSucceeded)
{
TasView.AllColumns.Clear();
StartNewTasMovie();
_engaged = true;
}
Expand Down

0 comments on commit 4c39a81

Please sign in to comment.