fix dragging of end xfades

git-svn-id: svn://localhost/ardour2/branches/3.0@12237 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-05-10 02:50:59 +00:00
parent e3a9576aed
commit bed955b409
2 changed files with 6 additions and 5 deletions

View File

@ -1702,7 +1702,6 @@ AudioRegionView::redraw_end_xfade_to (boost::shared_ptr<AudioRegion> ar, framecn
} else {
rend = trackview.editor().frame_to_pixel (_region->length() - inverse->back()->when);
inverse->curve().get_vector (inverse->front()->when, inverse->back()->when, vec.get(), npoints);
for (int i = 0, pci = 0; i < npoints; ++i) {

View File

@ -4576,15 +4576,17 @@ CrossfadeEdgeDrag::start_grab (GdkEvent* event, Gdk::Cursor *cursor)
void
CrossfadeEdgeDrag::motion (GdkEvent*, bool)
{
double distance = _drags->current_pointer_x() - grab_x();
double distance;
double new_length;
framecnt_t len;
boost::shared_ptr<AudioRegion> ar (arv->audio_region());
if (start) {
distance = _drags->current_pointer_x() - grab_x();
len = ar->fade_in()->back()->when;
} else {
distance = grab_x() - _drags->current_pointer_x();
len = ar->fade_out()->back()->when;
}
@ -4595,22 +4597,22 @@ CrossfadeEdgeDrag::motion (GdkEvent*, bool)
} else {
arv->redraw_end_xfade_to (ar, new_length);
}
// _editor->update_canvas_now ();
}
void
CrossfadeEdgeDrag::finished (GdkEvent*, bool)
{
double distance = _drags->current_pointer_x() - grab_x();
double distance;
double new_length;
framecnt_t len;
boost::shared_ptr<AudioRegion> ar (arv->audio_region());
if (start) {
distance = _drags->current_pointer_x() - grab_x();
len = ar->fade_in()->back()->when;
} else {
distance = grab_x() - _drags->current_pointer_x();
len = ar->fade_out()->back()->when;
}