diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2018-10-10 11:47:05 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2018-10-10 11:47:29 -0400 |
commit | 0542a3090182fa97bd355ef876cf1918408e32b0 (patch) | |
tree | 666471a1f62687e6a4960a5c6d63027ace6b6aa9 /gtk2_ardour/location_ui.cc | |
parent | 7d5eed09142ef5805c31940f563b43e87290ba62 (diff) |
use primary, not secondary, clock mode to drive other clock modes, and dynamically update region editors, location UI and editor regions when it changes
Diffstat (limited to 'gtk2_ardour/location_ui.cc')
-rw-r--r-- | gtk2_ardour/location_ui.cc | 13 |
1 files changed, 11 insertions, 2 deletions
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)); @@ -1104,6 +1106,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) { SessionHandlePtr::set_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; |