summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_drag.cc
diff options
context:
space:
mode:
authorColin Fletcher <colin.m.fletcher@googlemail.com>2014-07-01 19:33:21 +0100
committerColin Fletcher <colin.m.fletcher@googlemail.com>2014-07-01 20:43:34 +0100
commit264c62eb2613699902dbdabb777c5f776c17f340 (patch)
tree4c3c740e5b89767aa96cb4076cf172fb849530f2 /gtk2_ardour/editor_drag.cc
parent3f112f17c02cd5fe46cfa1e15970f4d58e4b23a8 (diff)
Ripple mode: remove debug output
Remove std::cerr output, and tidy up a couple of comments.
Diffstat (limited to 'gtk2_ardour/editor_drag.cc')
-rw-r--r--gtk2_ardour/editor_drag.cc22
1 files changed, 4 insertions, 18 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc
index 9ad867bbcb..91bfb2ce0c 100644
--- a/gtk2_ardour/editor_drag.cc
+++ b/gtk2_ardour/editor_drag.cc
@@ -1582,8 +1582,9 @@ 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();
@@ -1591,11 +1592,7 @@ RegionRippleDrag::add_all_after_to_views(TimeAxisView *tav, framepos_t where, co
Duple dmg_canvas_offset = _editor->_drag_motion_group->canvas_origin ();
rvg->reparent (_editor->_drag_motion_group);
- // XXX without the following, things jump in the y direction during drags
- // with it, they jump in the x direction
- // so we need to do the move in the y direction only
- // rvg->move (rv_canvas_offset - dmg_canvas_offset);
- std::cerr << "rv_canvas_offset = " << rv_canvas_offset << ", dmg_canvas_offset = " << dmg_canvas_offset << std::endl;
+ // we only need to move in the y direction
Duple fudge = rv_canvas_offset - dmg_canvas_offset;
fudge.x = 0;
rvg->move (fudge);
@@ -1624,8 +1621,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);
@@ -1745,7 +1740,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
@@ -1802,20 +1796,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
@@ -1824,17 +1814,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();