summaryrefslogtreecommitdiff
path: root/gtk2_ardour/region_editor.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2018-10-10 11:47:05 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2018-10-10 11:47:29 -0400
commit0542a3090182fa97bd355ef876cf1918408e32b0 (patch)
tree666471a1f62687e6a4960a5c6d63027ace6b6aa9 /gtk2_ardour/region_editor.cc
parent7d5eed09142ef5805c31940f563b43e87290ba62 (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/region_editor.cc')
-rw-r--r--gtk2_ardour/region_editor.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/gtk2_ardour/region_editor.cc b/gtk2_ardour/region_editor.cc
index 1818e61963..36c648b712 100644
--- a/gtk2_ardour/region_editor.cc
+++ b/gtk2_ardour/region_editor.cc
@@ -65,6 +65,8 @@ RegionEditor::RegionEditor (Session* s, boost::shared_ptr<Region> r)
set_session (s);
_clock_group->set_clock_mode (ARDOUR_UI::instance()->primary_clock->mode());
+ ARDOUR_UI::instance()->primary_clock->mode_changed.connect (sigc::mem_fun (*this, &RegionEditor::set_clock_mode_from_primary));
+
_clock_group->add (position_clock);
_clock_group->add (end_clock);
_clock_group->add (length_clock);
@@ -203,6 +205,12 @@ RegionEditor::~RegionEditor ()
}
void
+RegionEditor::set_clock_mode_from_primary ()
+{
+ _clock_group->set_clock_mode (ARDOUR_UI::instance()->primary_clock->mode());
+}
+
+void
RegionEditor::region_changed (const PBD::PropertyChange& what_changed)
{
if (what_changed.contains (ARDOUR::Properties::name)) {