Ignore playhead when finding delta from edit position for main clocks
authorColin Fletcher <colin.m.fletcher@googlemail.com>
Sat, 7 Feb 2015 01:13:04 +0000 (01:13 +0000)
committerColin Fletcher <colin.m.fletcher@googlemail.com>
Thu, 12 Feb 2015 18:06:16 +0000 (18:06 +0000)
Pass 'ignore_playhead == true' to Editor::get_preferred_edit_position()
when calculating offset of the primary and secondary main clocks if 'delta
to edit cursor' is selected, so that if the edit point is playhead, the
selected marker (if any) or mouse position will be used as the delta origin
instead.

gtk2_ardour/ardour_ui.cc

index ee27e8c6f37ed16ac501464ae6e38269730be385..3767689cfd51c3fdba76f65f9bfcfebae021070a 100644 (file)
@@ -2269,7 +2269,7 @@ ARDOUR_UI::update_clocks ()
        if (!_session) return;
 
        if (editor && !editor->dragging_playhead()) {
-               Clock (_session->audible_frame(), false, editor->get_preferred_edit_position()); /* EMIT_SIGNAL */
+               Clock (_session->audible_frame(), false, editor->get_preferred_edit_position (true)); /* EMIT_SIGNAL */
        }
 }
 
@@ -4218,13 +4218,13 @@ void
 ARDOUR_UI::update_transport_clocks (framepos_t pos)
 {
        if (ui_config->get_primary_clock_delta_edit_cursor()) {
-               primary_clock->set (pos, false, editor->get_preferred_edit_position());
+               primary_clock->set (pos, false, editor->get_preferred_edit_position (true));
        } else {
                primary_clock->set (pos);
        }
 
        if (ui_config->get_secondary_clock_delta_edit_cursor()) {
-               secondary_clock->set (pos, false, editor->get_preferred_edit_position());
+               secondary_clock->set (pos, false, editor->get_preferred_edit_position (true));
        } else {
                secondary_clock->set (pos);
        }