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 =
|
saveSelectionToMacroToolStripMenuItem.Enabled =
|
||||||
placeMacroAtSelectionToolStripMenuItem.Enabled =
|
placeMacroAtSelectionToolStripMenuItem.Enabled =
|
||||||
|
recentMacrosToolStripMenuItem.Enabled =
|
||||||
TasView.AnyRowsSelected;
|
TasView.AnyRowsSelected;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -265,14 +266,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
if (file != null)
|
if (file != null)
|
||||||
{
|
{
|
||||||
var macro = new MovieZone(file.FullName, Emulator, MovieSession, Tools);
|
DummyLoadMacro(file.FullName);
|
||||||
if (macro != null)
|
Config.RecentMacros.Add(file.FullName);
|
||||||
{
|
|
||||||
macro.Start = TasView.FirstSelectedIndex ?? 0;
|
|
||||||
macro.PlaceZone(CurrentTasMovie, Config);
|
|
||||||
|
|
||||||
Config.RecentMacros.Add(file.FullName);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -726,14 +726,14 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
private void DummyLoadMacro(string path)
|
private void DummyLoadMacro(string path)
|
||||||
{
|
{
|
||||||
if (!TasView.Focused && TasView.AnyRowsSelected)
|
if (!TasView.AnyRowsSelected)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var loadZone = new MovieZone(path, Emulator, MovieSession, Tools)
|
var loadZone = new MovieZone(path, Emulator, MovieSession, Tools)
|
||||||
{
|
{
|
||||||
Start = TasView.FirstSelectedIndex ?? 0
|
Start = TasView.FirstSelectedIndex.Value
|
||||||
};
|
};
|
||||||
loadZone.PlaceZone(CurrentTasMovie, Config);
|
loadZone.PlaceZone(CurrentTasMovie, Config);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue