case TempoMarkerItem:
{
- _drags->set (
- new TempoMarkerDrag (
- this,
- item,
- ArdourKeyboard::indicates_copy (event->button.state)
- ),
- event
- );
+ if (ArdourKeyboard::indicates_constraint (event->button.state)) {
+ _drags->set (
+ new TempoEndDrag (
+ this,
+ item
+ ),
+ event
+ );
+ } else {
+ _drags->set (
+ new TempoMarkerDrag (
+ this,
+ item,
+ ArdourKeyboard::indicates_copy (event->button.state)
+ ),
+ event
+ );
+ }
+
return true;
}
if (!Keyboard::modifier_state_equals (event->button.state, Keyboard::PrimaryModifier)
&& !ArdourKeyboard::indicates_constraint (event->button.state)) {
_drags->set (new CursorDrag (this, *playhead_cursor, false), event);
+ } else if (ArdourKeyboard::indicates_constraint (event->button.state)
+ && Keyboard::modifier_state_contains (event->button.state, Keyboard::PrimaryModifier)) {
+ _drags->set (new TempoTwistDrag (this, item), event);
} else if (ArdourKeyboard::indicates_constraint (event->button.state)) {
_drags->set (new BBTRulerDrag (this, item), event);
}
UIConfiguration::instance().get_follow_edits() &&
!_session->config.get_external_sync()) {
- framepos_t where = canvas_event_sample (event);
- snap_to(where);
- _session->request_locate (where, false);
+ MusicFrame where (canvas_event_sample (event), 0);
+ snap_to (where);
+ _session->request_locate (where.frame, false);
}
switch (event->button.button) {
bool
Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type)
{
- framepos_t where = canvas_event_sample (event);
+ MusicFrame where (canvas_event_sample (event), 0);
AutomationTimeAxisView* atv = 0;
_press_cursor_ctx.reset();
case SamplesRulerItem:
case MinsecRulerItem:
case BBTRulerItem:
- popup_ruler_menu (where, item_type);
+ popup_ruler_menu (where.frame, item_type);
break;
case MarkerItem:
case MarkerBarItem:
if (!_dragging_playhead) {
snap_to_with_modifier (where, event, RoundNearest, true);
- mouse_add_new_marker (where);
+ mouse_add_new_marker (where.frame);
}
return true;
if (!_dragging_playhead) {
// if we get here then a dragged range wasn't done
snap_to_with_modifier (where, event, RoundNearest, true);
- mouse_add_new_marker (where, true);
+ mouse_add_new_marker (where.frame, true);
}
return true;
case TempoBarItem:
case TempoCurveItem:
if (!_dragging_playhead) {
snap_to_with_modifier (where, event);
- mouse_add_new_tempo_event (where);
+ mouse_add_new_tempo_event (where.frame);
}
return true;
bool with_guard_points = Keyboard::modifier_state_equals (event->button.state, Keyboard::PrimaryModifier);
atv = dynamic_cast<AutomationTimeAxisView*>(clicked_axisview);
if (atv) {
- atv->add_automation_event (event, where, event->button.y, with_guard_points);
+ atv->add_automation_event (event, where.frame, event->button.y, with_guard_points);
}
return true;
break;