From 0542a3090182fa97bd355ef876cf1918408e32b0 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 10 Oct 2018 11:47:05 -0400 Subject: use primary, not secondary, clock mode to drive other clock modes, and dynamically update region editors, location UI and editor regions when it changes --- gtk2_ardour/location_ui.cc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'gtk2_ardour/location_ui.cc') diff --git a/gtk2_ardour/location_ui.cc b/gtk2_ardour/location_ui.cc index c868e1d38e..8354b54a2a 100644 --- a/gtk2_ardour/location_ui.cc +++ b/gtk2_ardour/location_ui.cc @@ -761,6 +761,8 @@ LocationUI::LocationUI (std::string state_node_name) _clock_group = new ClockGroup; + ARDOUR_UI::instance()->primary_clock->mode_changed.connect (sigc::mem_fun(*this, &LocationUI::set_clock_mode_from_primary)); + VBox* vbox = manage (new VBox); Table* table = manage (new Table (2, 2)); @@ -1103,6 +1105,13 @@ LocationUI::refresh_location_list () } } +void +LocationUI::set_clock_mode_from_primary () +{ + _clock_group->set_clock_mode (ARDOUR_UI::instance()->primary_clock->mode()); + _mode_set = true; +} + void LocationUI::set_session(ARDOUR::Session* s) { @@ -1180,11 +1189,11 @@ LocationUI::clock_mode_from_session_instant_xml () XMLNode* node = _session->instant_xml (_state_node_name); if (!node) { - return ARDOUR_UI::instance()->secondary_clock->mode(); + return ARDOUR_UI::instance()->primary_clock->mode(); } if (!node->get_property (X_("clock-mode"), _mode)) { - return ARDOUR_UI::instance()->secondary_clock->mode(); + return ARDOUR_UI::instance()->primary_clock->mode(); } _mode_set = true; -- cgit v1.2.3