mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
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
This commit is contained in:
parent
6813884857
commit
4f707481f3
1 changed files with 2 additions and 29 deletions
|
|
@ -180,35 +180,8 @@ ARDOUR_UI::update_transport_clocks (samplepos_t p)
|
||||||
{
|
{
|
||||||
timepos_t pos (p);
|
timepos_t pos (p);
|
||||||
|
|
||||||
switch (UIConfiguration::instance().get_primary_clock_delta_mode()) {
|
primary_clock->set (pos);
|
||||||
case NoDelta:
|
secondary_clock->set (pos);
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (big_clock_window) {
|
if (big_clock_window) {
|
||||||
big_clock->set (pos);
|
big_clock->set (pos);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue