actually paste MIDI at the right spot
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 13 Aug 2009 12:19:28 +0000 (12:19 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 13 Aug 2009 12:19:28 +0000 (12:19 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@5521 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/midi_region_view.cc

index 0fce0123744e50e11bbecf8efd4468df32348302..990d53aa32fea970aa6f2975f0c7e1d30248839c 100644 (file)
@@ -1722,22 +1722,17 @@ MidiRegionView::paste (nframes64_t pos, const MidiCutBuffer& mcb)
 {
        MidiModel::DeltaCommand* cmd = _model->new_delta_command("paste");
        MidiModel::TimeType beat_delta;
-       nframes64_t paste_pos_beats;
+       MidiModel::TimeType paste_pos_beats;
 
        paste_pos_beats = frames_to_beats (pos);
        beat_delta = mcb.notes().front()->time() - paste_pos_beats;
 
-       cerr << "For paste @ " << pos << " beats = " << paste_pos_beats 
-            << " first pasted note @ " << mcb.notes().front()->time()
-            << " ... delta = " << beat_delta << endl;
-       
        for (Evoral::Sequence<MidiModel::TimeType>::Notes::const_iterator i = mcb.notes().begin(); i != mcb.notes().end(); ++i) {
 
                boost::shared_ptr<NoteType> copied_note (new NoteType (*((*i).get())));
                copied_note->set_time (copied_note->time() - beat_delta);
                cmd->add (copied_note);
        }
-       _model->apply_command(trackview.session(), cmd);
-       
 
+       _model->apply_command(trackview.session(), cmd);
 }