diff options
author | Robin Gareus <robin@gareus.org> | 2017-06-21 13:03:00 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-06-21 18:13:03 +0200 |
commit | fd36355e2cd95550a0f7d9b7a6f5e3bc2fcc7fa2 (patch) | |
tree | ca8f3c671b99902f9dd083577681e09330a825c6 /gtk2_ardour/editor_drag.cc | |
parent | 1db9ce4c90b0a4b1f575e1517b200a506470f3c1 (diff) |
Log-scale/relative automation point dragging
Diffstat (limited to 'gtk2_ardour/editor_drag.cc')
-rw-r--r-- | gtk2_ardour/editor_drag.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index c9604b13df..4fed4f072d 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -4785,10 +4785,9 @@ ControlPointDrag::motion (GdkEvent* event, bool first_motion) _editor->begin_reversible_command (_("automation event move")); _point->line().start_drag_single (_point, _fixed_grab_x, initial_fraction); } - pair<double, float> result; + pair<float, float> result; result = _point->line().drag_motion (_editor->sample_to_pixel_unrounded (cx_mf.frame), fraction, false, _pushing, _final_index); - - show_verbose_cursor_text (_point->line().get_verbose_cursor_string (result.second)); + show_verbose_cursor_text (_point->line().get_verbose_cursor_relative_string (result.first, result.second)); } void @@ -4905,10 +4904,10 @@ LineDrag::motion (GdkEvent* event, bool first_move) } /* we are ignoring x position for this drag, so we can just pass in anything */ - pair<double, float> result; + pair<float, float> result; result = _line->drag_motion (0, fraction, true, false, ignored); - show_verbose_cursor_text (_line->get_verbose_cursor_string (result.second)); + show_verbose_cursor_text (_line->get_verbose_cursor_relative_string (result.first, result.second)); } void @@ -6396,10 +6395,10 @@ AutomationRangeDrag::motion (GdkEvent*, bool first_move) for (list<Line>::iterator l = _lines.begin(); l != _lines.end(); ++l) { float const f = y_fraction (l->line, current_pointer_y()); /* we are ignoring x position for this drag, so we can just pass in anything */ - pair<double, float> result; + pair<float, float> result; uint32_t ignored; result = l->line->drag_motion (0, f, true, false, ignored); - show_verbose_cursor_text (l->line->get_verbose_cursor_relative_string (l->original_fraction, result.second)); + show_verbose_cursor_text (l->line->get_verbose_cursor_relative_string (result.first, result.second)); } } |