TimeAxisView event handling calls into Editor track DnD code
This commit is contained in:
parent
b5c77a5c51
commit
911f94ecaa
|
@ -438,7 +438,13 @@ TimeAxisView::controls_ebox_button_press (GdkEventButton* event)
|
|||
_ebox_release_can_act = true;
|
||||
|
||||
if (maybe_set_cursor (event->y) > 0) {
|
||||
|
||||
_resize_drag_start = event->y_root;
|
||||
|
||||
} else {
|
||||
if (event->button == 1) {
|
||||
_editor.start_track_drag (*this, event->y, controls_ebox);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -453,6 +459,12 @@ TimeAxisView::idle_resize (int32_t h)
|
|||
bool
|
||||
TimeAxisView::controls_ebox_motion (GdkEventMotion* ev)
|
||||
{
|
||||
if (_editor.track_dragging()) {
|
||||
_editor.mid_track_drag (ev, controls_ebox);
|
||||
gdk_event_request_motions (ev);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (_resize_drag_start >= 0) {
|
||||
|
||||
/* (ab)use the DragManager to do autoscrolling - basically we
|
||||
|
@ -468,13 +480,15 @@ TimeAxisView::controls_ebox_motion (GdkEventMotion* ev)
|
|||
_editor.add_to_idle_resize (this, delta);
|
||||
_resize_drag_start = ev->y_root;
|
||||
_did_resize = true;
|
||||
gdk_event_request_motions (ev);
|
||||
return true;
|
||||
} else {
|
||||
/* not dragging but ... */
|
||||
maybe_set_cursor (ev->y);
|
||||
}
|
||||
|
||||
gdk_event_request_motions(ev);
|
||||
return true;
|
||||
gdk_event_request_motions (ev);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
Loading…
Reference in New Issue