From 5a067f56e45ed2ce1ef01fd9791a4fdf9f46c64b Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Wed, 2 May 2012 22:42:31 +0000 Subject: [PATCH] Add command "time/lead/both" which adds both lead in and out Originally committed to SVN as r6742. --- aegisub/src/command/time.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/aegisub/src/command/time.cpp b/aegisub/src/command/time.cpp index cf4d3930d..691e18c51 100644 --- a/aegisub/src/command/time.cpp +++ b/aegisub/src/command/time.cpp @@ -244,6 +244,19 @@ struct time_snap_scene : public validate_video_loaded { } }; +struct time_add_lead_both : public Command { + CMD_NAME("time/lead/both") + STR_MENU("Add lead in and out") + STR_DISP("Add lead in and out") + STR_HELP("Add lead in and out") + void operator()(agi::Context *c) { + if (AudioTimingController *tc = c->audioController->GetTimingController()) { + tc->AddLeadIn(); + tc->AddLeadOut(); + } + } +}; + struct time_add_lead_in : public Command { CMD_NAME("time/lead/in") STR_MENU("Add lead in") @@ -308,6 +321,7 @@ struct time_prev : public Command { namespace cmd { void init_time() { + reg(new time_add_lead_both); reg(new time_add_lead_in); reg(new time_add_lead_out); reg(new time_continuous_end);