mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 23:05:04 +01:00
Refix yesterday's patch; ignore motion events that haven't moved anywhere, and don't try to autoscroll vertically when dragging range markers.
git-svn-id: svn://localhost/ardour2/branches/3.0@6457 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
27eb926d3f
commit
46534f2f59
2 changed files with 11 additions and 1 deletions
|
|
@ -189,10 +189,16 @@ Drag::motion_handler (GdkEvent* event, bool from_autoscroll)
|
||||||
_last_pointer_frame = adjusted_current_frame (event);
|
_last_pointer_frame = adjusted_current_frame (event);
|
||||||
_current_pointer_frame = _editor->event_frame (event, &_current_pointer_x, &_current_pointer_y);
|
_current_pointer_frame = _editor->event_frame (event, &_current_pointer_x, &_current_pointer_y);
|
||||||
|
|
||||||
|
/* check to see if we have moved in any way that matters since the last motion event */
|
||||||
|
if ( (!x_movement_matters() || _last_pointer_frame == adjusted_current_frame (event)) &&
|
||||||
|
(!y_movement_matters() || _last_pointer_y == _current_pointer_y) ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
pair<nframes64_t, int> const threshold = move_threshold ();
|
pair<nframes64_t, int> const threshold = move_threshold ();
|
||||||
|
|
||||||
bool const old_move_threshold_passed = _move_threshold_passed;
|
bool const old_move_threshold_passed = _move_threshold_passed;
|
||||||
|
|
||||||
if (!from_autoscroll && !_move_threshold_passed) {
|
if (!from_autoscroll && !_move_threshold_passed) {
|
||||||
|
|
||||||
bool const xp = (::llabs (adjusted_current_frame (event) - _grab_frame) >= threshold.first);
|
bool const xp = (::llabs (adjusted_current_frame (event) - _grab_frame) >= threshold.first);
|
||||||
|
|
|
||||||
|
|
@ -613,6 +613,10 @@ public:
|
||||||
void motion (GdkEvent *, bool);
|
void motion (GdkEvent *, bool);
|
||||||
void finished (GdkEvent *, bool);
|
void finished (GdkEvent *, bool);
|
||||||
|
|
||||||
|
bool allow_vertical_autoscroll () const {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool y_movement_matters () const {
|
bool y_movement_matters () const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue