summaryrefslogtreecommitdiff
path: root/gtk2_ardour/main_clock.cc
diff options
context:
space:
mode:
authorColin Fletcher <colin.m.fletcher@googlemail.com>2015-03-08 15:48:27 +0000
committerColin Fletcher <colin.m.fletcher@googlemail.com>2015-03-09 19:17:53 +0000
commitf7a2df1c9a8c540f7e5778561c8527c525874b84 (patch)
treeeb7b15cc2056b492f002317d0da5cca251087245 /gtk2_ardour/main_clock.cc
parent99e15d94025b7ce9046b3e8d4c4e7b2e1635df7a (diff)
Make editing of meter work at the current position
Add a function TempoMap::meter_section_at(), similar to TempoMap::tempo_section_at() but returning the meter section at the given position, and use this to make editing meter changes from the main clock work on the meter that's in effect at the current position.
Diffstat (limited to 'gtk2_ardour/main_clock.cc')
-rw-r--r--gtk2_ardour/main_clock.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/gtk2_ardour/main_clock.cc b/gtk2_ardour/main_clock.cc
index f90599de13..26d780ea8a 100644
--- a/gtk2_ardour/main_clock.cc
+++ b/gtk2_ardour/main_clock.cc
@@ -99,8 +99,7 @@ MainClock::edit_current_tempo ()
void
MainClock::edit_current_meter ()
{
- ARDOUR::Meter m = PublicEditor::instance().session()->tempo_map().meter_at (absolute_time());
- ARDOUR::MeterSection ms (absolute_time(), m.divisions_per_bar(), m.note_divisor());
+ ARDOUR::MeterSection ms = PublicEditor::instance().session()->tempo_map().meter_section_at (absolute_time());
PublicEditor::instance().edit_meter_section (&ms);
}