fix copy-drag of regions, i believe
git-svn-id: svn://localhost/ardour2/trunk@1524 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
2e4fc4c3f1
commit
9203cb8f66
@ -2867,7 +2867,6 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
||||
|
||||
latest_regionview = 0;
|
||||
|
||||
sigc::connection c = atv->view()->RegionViewAdded.connect (mem_fun(*this, &Editor::collect_new_region_view));
|
||||
|
||||
/* create a new region with the same name. */
|
||||
|
||||
@ -2885,6 +2884,7 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
||||
|
||||
newregion->set_locked (false);
|
||||
|
||||
sigc::connection c = atv->view()->RegionViewAdded.connect (mem_fun(*this, &Editor::collect_new_region_view));
|
||||
to_playlist->add_region (newregion, (nframes_t) (rv->region()->position() * atv->get_diskstream()->speed()));
|
||||
|
||||
c.disconnect ();
|
||||
@ -2894,8 +2894,6 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (new_regionviews.empty()) {
|
||||
return;
|
||||
}
|
||||
@ -3185,6 +3183,20 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
||||
MOTION
|
||||
************************************************************/
|
||||
|
||||
bool do_move;
|
||||
|
||||
if (drag_info.first_move) {
|
||||
if (drag_info.move_threshold_passed) {
|
||||
do_move = true;
|
||||
} else {
|
||||
do_move = false;
|
||||
}
|
||||
} else {
|
||||
do_move = true;
|
||||
}
|
||||
|
||||
if (do_move) {
|
||||
|
||||
pair<set<boost::shared_ptr<Playlist> >::iterator,bool> insert_result;
|
||||
const list<RegionView*>& layered_regions = selection->regions.by_layer();
|
||||
|
||||
@ -3308,6 +3320,7 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rv->region()->set_opaque(false);
|
||||
}
|
||||
|
||||
@ -3316,18 +3329,19 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
|
||||
} else {
|
||||
rv->move (x_delta, y_delta);
|
||||
}
|
||||
}
|
||||
|
||||
if (drag_info.first_move) {
|
||||
} /* foreach region */
|
||||
|
||||
} /* if do_move */
|
||||
|
||||
if (drag_info.first_move && drag_info.move_threshold_passed) {
|
||||
cursor_group->raise_to_top();
|
||||
}
|
||||
|
||||
drag_info.first_move = false;
|
||||
}
|
||||
|
||||
if (x_delta != 0 && !drag_info.brushing) {
|
||||
show_verbose_time_cursor (drag_info.last_frame_position, 10);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user