MenuList& play_items = play_menu->items();
play_menu->set_name ("ArdourContextMenu");
- play_items.push_back (MenuElem (_("Play from edit cursor")));
+ play_items.push_back (MenuElem (_("Play from edit cursor"), mem_fun(*this, &Editor::play_from_edit_cursor)));
play_items.push_back (MenuElem (_("Play from start"), mem_fun(*this, &Editor::play_from_start)));
play_items.push_back (MenuElem (_("Play region"), mem_fun(*this, &Editor::play_selected_region)));
play_items.push_back (SeparatorElem());
MenuList& play_items = play_menu->items();
play_menu->set_name ("ArdourContextMenu");
- play_items.push_back (MenuElem (_("Play from edit cursor")));
+ play_items.push_back (MenuElem (_("Play from edit cursor"), mem_fun(*this, &Editor::play_from_edit_cursor)));
play_items.push_back (MenuElem (_("Play from start"), mem_fun(*this, &Editor::play_from_start)));
edit_items.push_back (MenuElem (_("Play"), *play_menu));
void rename_region_finished (bool);
void play_from_start ();
+ void play_from_edit_cursor ();
void play_selected_region ();
void audition_selected_region ();
void loop_selected_region ();
case ZoomFocusEdit:
/* try to keep the edit cursor in the center */
- if (edit_cursor->current_frame > leftmost_frame + (new_page/2)) {
+ if (edit_cursor->current_frame > new_page/2) {
leftmost_after_zoom = edit_cursor->current_frame - (new_page/2);
} else {
leftmost_after_zoom = 0;
session->request_locate (session->current_start_frame(), true);
}
+void
+Editor::play_from_edit_cursor ()
+{
+ session->request_locate (edit_cursor->current_frame, true);
+}
+
void
Editor::play_selection ()
{