summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor_drag.cc10
-rw-r--r--gtk2_ardour/editor_markers.cc9
-rw-r--r--gtk2_ardour/editor_mouse.cc2
3 files changed, 15 insertions, 6 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc
index 63fff4e463..53f1e74232 100644
--- a/gtk2_ardour/editor_drag.cc
+++ b/gtk2_ardour/editor_drag.cc
@@ -3201,7 +3201,9 @@ MeterMarkerDrag::motion (GdkEvent* event, bool first_move)
/* round bbt to bars */
map.round_bbt (bbt, -1);
- if (bbt.bars > _real_section->bbt().bars) {
+ if (Keyboard::modifier_state_equals (event->button.state, ArdourKeyboard::constraint_modifier ())) {
+ _editor->session()->tempo_map().gui_dilate_tempo (_real_section, pf);
+ } else if (bbt.bars > _real_section->bbt().bars) {
const double pulse = _real_section->pulse() + (_real_section->note_divisor() / _real_section->divisions_per_bar());
_editor->session()->tempo_map().gui_move_meter (_real_section, pulse);
} else if (bbt.bars < _real_section->bbt().bars) {
@@ -3210,7 +3212,11 @@ MeterMarkerDrag::motion (GdkEvent* event, bool first_move)
_editor->session()->tempo_map().gui_move_meter (_real_section, pulse);
}
} else {
- _editor->session()->tempo_map().gui_move_meter (_real_section, pf);
+ if (Keyboard::modifier_state_equals (event->button.state, ArdourKeyboard::constraint_modifier ())) {
+ _editor->session()->tempo_map().gui_dilate_tempo (_real_section, pf);
+ } else {
+ _editor->session()->tempo_map().gui_move_meter (_real_section, pf);
+ }
}
_marker->set_position (pf);
show_verbose_cursor_time (_real_section->frame());
diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc
index 74e35a246b..9664d6f65f 100644
--- a/gtk2_ardour/editor_markers.cc
+++ b/gtk2_ardour/editor_markers.cc
@@ -1426,9 +1426,12 @@ Editor::toggle_tempo_type ()
begin_reversible_command (_("change tempo type"));
XMLNode &before = _session->tempo_map().get_state();
TempoSection* tsp = &tm->tempo();
- _session->tempo_map().replace_tempo (*tsp, Tempo (tsp->beats_per_minute(), tsp->note_type())
- , (tsp->position_lock_style() == MusicTime) ? tsp->pulse() : tsp->frame()
- , (tsp->type() == TempoSection::Ramp) ? TempoSection::Constant : TempoSection::Ramp);
+ if (tsp->position_lock_style() == AudioTime) {
+ _session->tempo_map().replace_tempo (*tsp, Tempo (tsp->beats_per_minute(), tsp->note_type()), tsp->frame(), (tsp->type() == TempoSection::Ramp) ? TempoSection::Constant : TempoSection::Ramp);
+ } else {
+ _session->tempo_map().replace_tempo (*tsp, Tempo (tsp->beats_per_minute(), tsp->note_type()), tsp->pulse(), (tsp->type() == TempoSection::Ramp) ? TempoSection::Constant : TempoSection::Ramp);
+ }
+
XMLNode &after = _session->tempo_map().get_state();
_session->add_command(new MementoCommand<TempoMap>(_session->tempo_map(), &before, &after));
commit_reversible_command ();
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc
index 49aaac68bf..4a4bfe1e1e 100644
--- a/gtk2_ardour/editor_mouse.cc
+++ b/gtk2_ardour/editor_mouse.cc
@@ -697,7 +697,7 @@ Editor::button_press_handler_1 (ArdourCanvas::Item* item, GdkEvent* event, ItemT
new MeterMarkerDrag (
this,
item,
- Keyboard::modifier_state_contains (event->button.state, Keyboard::CopyModifier)
+ Keyboard::modifier_state_equals (event->button.state, Keyboard::CopyModifier)
),
event
);