TAStudio:

-Dis/enable recent macros menu along with other macro menu items.
-Remove redundant code from commit 350724a, make use of existing method.
-Fix regressions from commits 0d72cd9 and cb912be in said method.
This commit is contained in:
SuuperW 2021-01-16 09:11:27 -06:00
parent 4d06fb1fde
commit 2834f8aa39
2 changed files with 5 additions and 10 deletions

View File

@ -21,6 +21,7 @@ namespace BizHawk.Client.EmuHawk
saveSelectionToMacroToolStripMenuItem.Enabled =
placeMacroAtSelectionToolStripMenuItem.Enabled =
recentMacrosToolStripMenuItem.Enabled =
TasView.AnyRowsSelected;
}
@ -265,14 +266,8 @@ namespace BizHawk.Client.EmuHawk
if (file != null)
{
var macro = new MovieZone(file.FullName, Emulator, MovieSession, Tools);
if (macro != null)
{
macro.Start = TasView.FirstSelectedIndex ?? 0;
macro.PlaceZone(CurrentTasMovie, Config);
Config.RecentMacros.Add(file.FullName);
}
DummyLoadMacro(file.FullName);
Config.RecentMacros.Add(file.FullName);
}
}

View File

@ -726,14 +726,14 @@ namespace BizHawk.Client.EmuHawk
private void DummyLoadMacro(string path)
{
if (!TasView.Focused && TasView.AnyRowsSelected)
if (!TasView.AnyRowsSelected)
{
return;
}
var loadZone = new MovieZone(path, Emulator, MovieSession, Tools)
{
Start = TasView.FirstSelectedIndex ?? 0
Start = TasView.FirstSelectedIndex.Value
};
loadZone.PlaceZone(CurrentTasMovie, Config);
}