summaryrefslogtreecommitdiff
path: root/gtk2_ardour/location_ui.cc
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2016-12-29 01:39:31 +1100
committernick_m <mainsbridge@gmail.com>2016-12-29 01:39:31 +1100
commitd0580ecfbc1182f3c57b4d04e514f1d944225f14 (patch)
tree12c6854fd3955f85f1e4a9064b2cc4ac9ae35c62 /gtk2_ardour/location_ui.cc
parent0869aa0f6c045bea9ae3b1a030570f27faa90358 (diff)
allow all types of range location (loop, start, end etc.) to be glued to bars and beats.
Diffstat (limited to 'gtk2_ardour/location_ui.cc')
-rw-r--r--gtk2_ardour/location_ui.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/gtk2_ardour/location_ui.cc b/gtk2_ardour/location_ui.cc
index 76111a49e7..4bdc9798c5 100644
--- a/gtk2_ardour/location_ui.cc
+++ b/gtk2_ardour/location_ui.cc
@@ -414,12 +414,14 @@ LocationEditRow::to_playhead_button_pressed (LocationPart part)
return;
}
+ const int32_t divisions = PublicEditor::instance().get_grid_music_divisions (0);
+
switch (part) {
case LocStart:
- location->set_start (_session->transport_frame ());
+ location->set_start (_session->transport_frame (), false, true, divisions);
break;
case LocEnd:
- location->set_end (_session->transport_frame ());
+ location->set_end (_session->transport_frame (), false, true,divisions);
if (location->is_session_range()) {
_session->set_end_is_free (false);
}
@@ -461,18 +463,20 @@ LocationEditRow::clock_changed (LocationPart part)
return;
}
+ const int32_t divisions = PublicEditor::instance().get_grid_music_divisions (0);
+
switch (part) {
case LocStart:
- location->set_start (start_clock.current_time());
+ location->set_start (start_clock.current_time(), false, true, divisions);
break;
case LocEnd:
- location->set_end (end_clock.current_time());
+ location->set_end (end_clock.current_time(), false, true, divisions);
if (location->is_session_range()) {
_session->set_end_is_free (false);
}
break;
case LocLength:
- location->set_end (location->start() + length_clock.current_duration());
+ location->set_end (location->start() + length_clock.current_duration(), false, true, divisions);
if (location->is_session_range()) {
_session->set_end_is_free (false);
}