diff options
author | GZharun <grygoriiz@wavesglobal.com> | 2015-01-23 14:46:23 +0200 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-01-23 13:43:52 -0500 |
commit | 6976a781000ab0d1942d2297b7ab0ee500416a7a (patch) | |
tree | a5a806e7868416b03528e0a4ce7d6a832181b420 /gtk2_ardour/editor_drag.cc | |
parent | 21cb2d6ff9477b3fef1a3275f08ca75b496bfa82 (diff) |
[Summary] Fixed bug 45163: Trim range from right corner of timeline leads Tracks to crash
[Details] Crash was provoked because of an attempt to add commands to the session reversible command, but when autoscroll started and trim began with autoscroll the session reversible command was not created for for Trim Drag.
Diffstat (limited to 'gtk2_ardour/editor_drag.cc')
-rw-r--r-- | gtk2_ardour/editor_drag.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index eca6131f03..a98fe25568 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -219,6 +219,7 @@ Drag::Drag (Editor* e, ArdourCanvas::Item* i, bool trackview_only) , _pointer_frame_offset (0) , _trackview_only (trackview_only) , _move_threshold_passed (false) + , _starting_point_passed (false) , _was_double_click (false) , _raw_grab_frame (0) , _grab_frame (0) @@ -369,7 +370,7 @@ Drag::motion_handler (GdkEvent* event, bool from_autoscroll) bool const old_move_threshold_passed = _move_threshold_passed; - if (!from_autoscroll && !_move_threshold_passed) { + if (!_move_threshold_passed) { bool const xp = (::llabs (_drags->current_pointer_frame () - _raw_grab_frame) >= threshold.first); bool const yp = (::fabs ((current_pointer_y () - _grab_y)) >= threshold.second); @@ -385,7 +386,13 @@ Drag::motion_handler (GdkEvent* event, bool from_autoscroll) } if (!_editor->autoscroll_active() || from_autoscroll) { - motion (event, _move_threshold_passed != old_move_threshold_passed); + + bool first_move = (_move_threshold_passed != old_move_threshold_passed) || + from_autoscroll; + + motion (event, first_move && !_starting_point_passed); + + _starting_point_passed = first_move; _last_pointer_x = _drags->current_pointer_x (); _last_pointer_y = current_pointer_y (); |