Revert "add new action and loop marker menu item for setting up loop record"
This reverts commit ebb43508f1
.
This commit is contained in:
parent
34f088576c
commit
621fd845e6
|
@ -1457,10 +1457,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
void set_loop_from_selection (bool play);
|
||||
void set_punch_from_selection ();
|
||||
void set_punch_from_region ();
|
||||
void set_punch_from_loop ();
|
||||
|
||||
void setup_loop_record ();
|
||||
|
||||
void set_session_start_from_playhead ();
|
||||
void set_session_end_from_playhead ();
|
||||
void set_session_extents_from_selection ();
|
||||
|
@ -1687,7 +1684,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
void marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
|
||||
void tempo_or_meter_marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
|
||||
void new_transport_marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
|
||||
void build_range_marker_menu (bool, bool, bool);
|
||||
void build_range_marker_menu (bool, bool);
|
||||
void build_marker_menu (ARDOUR::Location *);
|
||||
void build_tempo_or_meter_marker_menu (bool);
|
||||
void build_new_transport_marker_menu ();
|
||||
|
|
|
@ -306,9 +306,6 @@ Editor::register_actions ()
|
|||
reg_sens (editor_actions, "set-punch-from-edit-range", _("Set Punch from Selection"), sigc::mem_fun(*this, &Editor::set_punch_from_selection));
|
||||
reg_sens (editor_actions, "set-session-from-edit-range", _("Set Session Start/End from Selection"), sigc::mem_fun(*this, &Editor::set_session_extents_from_selection));
|
||||
|
||||
reg_sens (editor_actions, "set-punch-from-loop", _("Set Punch from Loop"), sigc::mem_fun(*this, &Editor::set_punch_from_loop));
|
||||
reg_sens (editor_actions, "setup-loop-record", _("Setup Loop Record"), sigc::mem_fun(*this, &Editor::setup_loop_record));
|
||||
|
||||
/* this is a duplicated action so that the main menu can use a different label */
|
||||
reg_sens (editor_actions, "main-menu-play-selected-regions", _("Play Selected Regions"), sigc::mem_fun (*this, &Editor::play_selected_region));
|
||||
reg_sens (editor_actions, "play-from-edit-point", _("Play From Edit Point"), sigc::mem_fun(*this, &Editor::play_from_edit_point));
|
||||
|
|
|
@ -834,7 +834,7 @@ Editor::marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
|
|||
if (loc == transport_loop_location() || loc == transport_punch_location() || loc->is_session_range ()) {
|
||||
|
||||
if (transport_marker_menu == 0) {
|
||||
build_range_marker_menu (loc == transport_loop_location(), loc == transport_punch_location(), loc->is_session_range());
|
||||
build_range_marker_menu (loc == transport_loop_location() || loc == transport_punch_location(), loc->is_session_range());
|
||||
}
|
||||
|
||||
marker_menu_item = item;
|
||||
|
@ -864,7 +864,7 @@ Editor::marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
|
|||
|
||||
} else if (loc->is_range_marker()) {
|
||||
if (range_marker_menu == 0) {
|
||||
build_range_marker_menu (false, false, false);
|
||||
build_range_marker_menu (false, false);
|
||||
}
|
||||
marker_menu_item = item;
|
||||
range_marker_menu->popup (1, ev->time);
|
||||
|
@ -922,11 +922,11 @@ Editor::build_marker_menu (Location* loc)
|
|||
}
|
||||
|
||||
void
|
||||
Editor::build_range_marker_menu (bool loop, bool punch, bool session)
|
||||
Editor::build_range_marker_menu (bool loop_or_punch, bool session)
|
||||
{
|
||||
using namespace Menu_Helpers;
|
||||
|
||||
bool const loop_or_punch_or_session = loop | punch | session;
|
||||
bool const loop_or_punch_or_session = loop_or_punch | session;
|
||||
|
||||
Menu *markerMenu = new Menu;
|
||||
if (loop_or_punch_or_session) {
|
||||
|
@ -940,12 +940,7 @@ Editor::build_range_marker_menu (bool loop, bool punch, bool session)
|
|||
items.push_back (MenuElem (_("Play Range"), sigc::mem_fun(*this, &Editor::marker_menu_play_range)));
|
||||
items.push_back (MenuElem (_("Locate to Marker"), sigc::mem_fun(*this, &Editor::marker_menu_set_playhead)));
|
||||
items.push_back (MenuElem (_("Play from Marker"), sigc::mem_fun(*this, &Editor::marker_menu_play_from)));
|
||||
|
||||
if (!loop) {
|
||||
items.push_back (MenuElem (_("Loop Range"), sigc::mem_fun(*this, &Editor::marker_menu_loop_range)));
|
||||
} else {
|
||||
items.push_back (MenuElem (_("Setup Loop Record"), sigc::mem_fun(*this, &Editor::setup_loop_record)));
|
||||
}
|
||||
items.push_back (MenuElem (_("Loop Range"), sigc::mem_fun(*this, &Editor::marker_menu_loop_range)));
|
||||
|
||||
items.push_back (MenuElem (_("Set Marker from Playhead"), sigc::mem_fun(*this, &Editor::marker_menu_set_from_playhead)));
|
||||
if (!Profile->get_sae()) {
|
||||
|
|
|
@ -6265,60 +6265,6 @@ Editor::set_punch_from_selection ()
|
|||
set_punch_range (start, end, _("set punch range from selection"));
|
||||
}
|
||||
|
||||
void
|
||||
Editor::set_punch_from_loop ()
|
||||
{
|
||||
if (_session == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
Location* tll;
|
||||
|
||||
if ((tll = transport_loop_location()) == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
set_punch_range (tll->start(), tll->end(), _("set punch range from loop"));
|
||||
}
|
||||
|
||||
void
|
||||
Editor::setup_loop_record ()
|
||||
{
|
||||
if (_session == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
Location * looploc = _session->locations()->auto_loop_location();
|
||||
|
||||
if (!looploc) {
|
||||
return;
|
||||
}
|
||||
|
||||
set_punch_range (looploc->start(), looploc->end(), _("setup loop recording"));
|
||||
|
||||
Glib::RefPtr<Action> action = ActionManager::get_action ("Transport", "TogglePunch");
|
||||
|
||||
if (action) {
|
||||
|
||||
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(action);
|
||||
|
||||
if (!tact) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* drive the other two actions from this one */
|
||||
|
||||
Glib::RefPtr<Action> in_action = ActionManager::get_action ("Transport", "TogglePunchIn");
|
||||
Glib::RefPtr<Action> out_action = ActionManager::get_action ("Transport", "TogglePunchOut");
|
||||
|
||||
if (in_action && out_action) {
|
||||
Glib::RefPtr<ToggleAction> tiact = Glib::RefPtr<ToggleAction>::cast_dynamic(in_action);
|
||||
Glib::RefPtr<ToggleAction> toact = Glib::RefPtr<ToggleAction>::cast_dynamic(out_action);
|
||||
tiact->set_active (true);
|
||||
toact->set_active (true);
|
||||
}
|
||||
}
|
||||
}
|
||||
void
|
||||
Editor::set_session_extents_from_selection ()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue