mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-22 06:36:29 +01:00
a set of inter-related subtle changes to get vertical autoscrolling to work, or at least work better.
This commit is contained in:
parent
e426c603b6
commit
c30bda5173
4 changed files with 79 additions and 49 deletions
|
|
@ -177,6 +177,12 @@ DragManager::motion_handler (GdkEvent* e, bool from_autoscroll)
|
|||
{
|
||||
bool r = false;
|
||||
|
||||
/* calling this implies that we expect the event to have canvas
|
||||
* coordinates
|
||||
*
|
||||
* Can we guarantee that this is true?
|
||||
*/
|
||||
|
||||
_current_pointer_frame = _editor->canvas_event_sample (e, &_current_pointer_x, &_current_pointer_y);
|
||||
|
||||
for (list<Drag*>::iterator i = _drags.begin(); i != _drags.end(); ++i) {
|
||||
|
|
@ -193,24 +199,6 @@ DragManager::motion_handler (GdkEvent* e, bool from_autoscroll)
|
|||
return r;
|
||||
}
|
||||
|
||||
bool
|
||||
DragManager::window_motion_handler (GdkEvent* e, bool from_autoscroll)
|
||||
{
|
||||
bool r = false;
|
||||
|
||||
_current_pointer_frame = _editor->canvas_event_sample (e, &_current_pointer_x, &_current_pointer_y);
|
||||
|
||||
for (list<Drag*>::iterator i = _drags.begin(); i != _drags.end(); ++i) {
|
||||
bool const t = (*i)->motion_handler (e, from_autoscroll);
|
||||
if (t) {
|
||||
r = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
bool
|
||||
DragManager::have_item (ArdourCanvas::Item* i) const
|
||||
{
|
||||
|
|
@ -398,6 +386,7 @@ Drag::motion_handler (GdkEvent* event, bool from_autoscroll)
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -711,7 +700,7 @@ RegionMotionDrag::motion (GdkEvent* event, bool first_move)
|
|||
|
||||
delta_time_axis_view = current_pointer_time_axis_view - _last_pointer_time_axis_view;
|
||||
delta_layer = current_pointer_layer - _last_pointer_layer;
|
||||
}
|
||||
}
|
||||
|
||||
/* Work out the change in x */
|
||||
framepos_t pending_region_position;
|
||||
|
|
@ -1932,8 +1921,6 @@ TrimDrag::start_grab (GdkEvent* event, Gdk::Cursor*)
|
|||
|
||||
framepos_t const pf = adjusted_current_frame (event);
|
||||
|
||||
cerr << "Button state = " << hex << event->button.state << dec << endl;
|
||||
|
||||
if (Keyboard::modifier_state_equals (event->button.state, Keyboard::PrimaryModifier)) {
|
||||
/* Move the contents of the region around without changing the region bounds */
|
||||
_operation = ContentsTrim;
|
||||
|
|
@ -1997,8 +1984,6 @@ TrimDrag::motion (GdkEvent* event, bool first_move)
|
|||
pair<set<boost::shared_ptr<Playlist> >::iterator,bool> insert_result;
|
||||
frameoffset_t frame_delta = 0;
|
||||
|
||||
cerr << "trim drag @ " << this << " motion\n";
|
||||
|
||||
if (tv && tv->is_track()) {
|
||||
speed = tv->track()->speed();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue