From 4f707481f34a79fbe371235aa4a14de780c81c78 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 2 Nov 2022 11:42:40 -0600 Subject: [PATCH] remove redundant code in ARDOUR_UI::update_transport_clocks() MainClock::set() already implements this logic, and does so correctly if there is no clock origin marker --- gtk2_ardour/ardour_ui3.cc | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/gtk2_ardour/ardour_ui3.cc b/gtk2_ardour/ardour_ui3.cc index 67c4f69263..dee8c7aeb1 100644 --- a/gtk2_ardour/ardour_ui3.cc +++ b/gtk2_ardour/ardour_ui3.cc @@ -180,35 +180,8 @@ ARDOUR_UI::update_transport_clocks (samplepos_t p) { timepos_t pos (p); - switch (UIConfiguration::instance().get_primary_clock_delta_mode()) { - case NoDelta: - primary_clock->set (pos); - break; - case DeltaEditPoint: - primary_clock->set_duration (pos.distance (editor->get_preferred_edit_position (EDIT_IGNORE_PHEAD)), false); - break; - case DeltaOriginMarker: - { - Location* loc = _session->locations()->clock_origin_location (); - primary_clock->set_duration (pos.distance (loc->start())); - } - break; - } - - switch (UIConfiguration::instance().get_secondary_clock_delta_mode()) { - case NoDelta: - secondary_clock->set (pos); - break; - case DeltaEditPoint: - secondary_clock->set_duration (pos.distance (editor->get_preferred_edit_position (EDIT_IGNORE_PHEAD)), false); - break; - case DeltaOriginMarker: - { - Location* loc = _session->locations()->clock_origin_location (); - secondary_clock->set_duration (pos.distance (loc->start())); - } - break; - } + primary_clock->set (pos); + secondary_clock->set (pos); if (big_clock_window) { big_clock->set (pos);