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 commits0d72cd9
andcb912be
in said method.
This commit is contained in:
parent
4d06fb1fde
commit
2834f8aa39
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue