mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-10 07:26:32 +01:00
Ripple mode: remove debug output
Remove std::cerr output, and tidy up a couple of comments. Conflicts: gtk2_ardour/editor_drag.cc
This commit is contained in:
parent
11bc9aa50d
commit
ba584c0901
1 changed files with 10 additions and 14 deletions
|
|
@ -1582,13 +1582,20 @@ RegionRippleDrag::add_all_after_to_views(TimeAxisView *tav, framepos_t where, co
|
|||
// the selection has already been added to _views
|
||||
|
||||
if (drag_in_progress) {
|
||||
// do the same things that RegionMotionDrag::motion does when first_move
|
||||
// is true for the region views that we're adding to _views this time
|
||||
// do the same things that RegionMotionDrag::motion does when
|
||||
// first_move is true, for the region views that we're adding
|
||||
// to _views this time
|
||||
|
||||
(*i)->drag_start();
|
||||
ArdourCanvas::Item* rvg = (*i)->get_canvas_group();
|
||||
Duple rv_canvas_offset = rvg->item_to_canvas (Duple (0,0));
|
||||
rvg->set_position (rv_canvas_offset);
|
||||
Duple dmg_canvas_offset = _editor->_drag_motion_group->canvas_origin ();
|
||||
rvg->reparent (_editor->_drag_motion_group);
|
||||
|
||||
// we only need to move in the y direction
|
||||
Duple fudge = rv_canvas_offset - dmg_canvas_offset;
|
||||
fudge.x = 0;
|
||||
rvg->move (fudge);
|
||||
}
|
||||
_views.push_back (DraggingView (*i, this, tav));
|
||||
}
|
||||
|
|
@ -1613,8 +1620,6 @@ RegionRippleDrag::remove_unselected_from_views(framecnt_t amount, bool move_regi
|
|||
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (tv);
|
||||
assert (rtv);
|
||||
|
||||
std::cerr << "rtv = " << rtv->name() << std::endl;
|
||||
|
||||
// plonk them back onto their own track
|
||||
rv->get_canvas_group()->reparent(rtv->view()->canvas_item());
|
||||
rv->get_canvas_group()->set_y_position (0);
|
||||
|
|
@ -1734,7 +1739,6 @@ RegionRippleDrag::motion (GdkEvent* event, bool first_move)
|
|||
// and add the regions after the drop point on the new playlist to _views instead.
|
||||
// undo the effect of rippling the previous playlist, and include the effect of removing
|
||||
// the dragged region(s) from this track
|
||||
std::cerr << "dragged from " << prev_tav->name() << " to " << tv->name() << std::endl;
|
||||
|
||||
remove_unselected_from_views (prev_amount, false);
|
||||
// ripple previous playlist according to the regions that have been removed onto the new playlist
|
||||
|
|
@ -1791,20 +1795,16 @@ RegionRippleDrag::finished (GdkEvent* event, bool movement_occurred)
|
|||
// if regions were dragged across tracks, we've rippled any later
|
||||
// regions on the track the regions were dragged off, so we need
|
||||
// to add the original track to the undo record
|
||||
std::cerr << "adding orig_tav " << orig_tav->name() << " to undo" << std::endl;
|
||||
orig_tav->playlist()->clear_changes();
|
||||
vector<Command*> cmds;
|
||||
orig_tav->playlist()->rdiff (cmds);
|
||||
_editor->session()->add_commands (cmds);
|
||||
}
|
||||
if (prev_tav && prev_tav != orig_tav) {
|
||||
std::cerr << "adding prev_tav " << prev_tav->name() << " to undo" << std::endl;
|
||||
prev_tav->playlist()->clear_changes();
|
||||
vector<Command*> cmds;
|
||||
prev_tav->playlist()->rdiff (cmds);
|
||||
_editor->session()->add_commands (cmds);
|
||||
} else if (prev_tav) {
|
||||
std::cerr << "prev_tav == orig_tav" << std::endl;
|
||||
}
|
||||
} else {
|
||||
// selection spanned multiple tracks - all will need adding to undo record
|
||||
|
|
@ -1813,17 +1813,13 @@ RegionRippleDrag::finished (GdkEvent* event, bool movement_occurred)
|
|||
std::set<boost::shared_ptr<ARDOUR::Playlist> >::const_iterator pi;
|
||||
|
||||
for (pi = playlists.begin(); pi != playlists.end(); ++pi) {
|
||||
|
||||
std::cerr << "adding playlist with selection " << (*pi)->name() << " to undo" << std::endl;
|
||||
(*pi)->clear_changes();
|
||||
vector<Command*> cmds;
|
||||
(*pi)->rdiff (cmds);
|
||||
_editor->session()->add_commands (cmds);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// other modified playlists are added to undo by RegionMoveDrag::finished()
|
||||
RegionMoveDrag::finished (event, movement_occurred);
|
||||
_editor->commit_reversible_command();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue