Remove unused code
This code was changed to implement ripple mode, but meanwhile it was removed altogether in cairocanvas. Remove it here too to simplify merging.
This commit is contained in:
@@ -2081,88 +2081,6 @@ Editor::unhide_ranges ()
|
||||
|
||||
/* INSERT/REPLACE */
|
||||
|
||||
void
|
||||
Editor::insert_region_list_drag (boost::shared_ptr<Region> region, int x, int y)
|
||||
{
|
||||
double cx, cy;
|
||||
framepos_t where;
|
||||
RouteTimeAxisView *rtv = 0;
|
||||
boost::shared_ptr<Playlist> playlist;
|
||||
|
||||
GdkEvent event;
|
||||
event.type = GDK_BUTTON_RELEASE;
|
||||
event.button.x = x;
|
||||
event.button.y = y;
|
||||
|
||||
where = window_event_sample (&event, &cx, &cy);
|
||||
|
||||
if (where < leftmost_frame || where > leftmost_frame + current_page_samples()) {
|
||||
/* clearly outside canvas area */
|
||||
return;
|
||||
}
|
||||
|
||||
std::pair<TimeAxisView*, int> tv = trackview_by_y_position (cy);
|
||||
if (tv.first == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((rtv = dynamic_cast<RouteTimeAxisView*> (tv.first)) == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((playlist = rtv->playlist()) == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
snap_to (where);
|
||||
|
||||
begin_reversible_command (_("insert dragged region"));
|
||||
playlist->clear_changes ();
|
||||
playlist->add_region (RegionFactory::create (region, true), where, 1.0);
|
||||
if (Config->get_edit_mode() == Ripple)
|
||||
playlist->ripple (where, region->length(), boost::shared_ptr<Region>());
|
||||
|
||||
_session->add_command(new StatefulDiffCommand (playlist));
|
||||
commit_reversible_command ();
|
||||
}
|
||||
|
||||
void
|
||||
Editor::insert_route_list_drag (boost::shared_ptr<Route> route, int x, int y)
|
||||
{
|
||||
double cx, cy;
|
||||
RouteTimeAxisView *dest_rtv = 0;
|
||||
RouteTimeAxisView *source_rtv = 0;
|
||||
|
||||
GdkEvent event;
|
||||
event.type = GDK_BUTTON_RELEASE;
|
||||
event.button.x = x;
|
||||
event.button.y = y;
|
||||
|
||||
window_event_sample (&event, &cx, &cy);
|
||||
|
||||
std::pair<TimeAxisView*, int> const tv = trackview_by_y_position (cy);
|
||||
if (tv.first == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((dest_rtv = dynamic_cast<RouteTimeAxisView*> (tv.first)) == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* use this drag source to add underlay to a track. But we really don't care
|
||||
about the Route, only the view of the route, so find it first */
|
||||
for(TrackViewList::iterator it = track_views.begin(); it != track_views.end(); ++it) {
|
||||
if((source_rtv = dynamic_cast<RouteTimeAxisView*>(*it)) == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if(source_rtv->route() == route && source_rtv != dest_rtv) {
|
||||
dest_rtv->add_underlay(source_rtv->view());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::insert_region_list_selection (float times)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user