diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-01-04 18:48:32 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-01-04 18:48:32 +0000 |
commit | f61a0d892cfba3ada195a8d597292d383f089037 (patch) | |
tree | f58efe22a9482ca1d6e589127187d5e5538bf258 /gtk2_ardour/midi_region_view.cc | |
parent | 2858b0474e4bedf3ab67a539a7f0d12380ac7bda (diff) |
fix error in framepos_{plus,minus}_bbt() which miscounted beats while stepping through bars - stops dragged MIDI notes from ending up in the wrong place, and more
git-svn-id: svn://localhost/ardour2/branches/3.0@11159 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/midi_region_view.cc')
-rw-r--r-- | gtk2_ardour/midi_region_view.cc | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index d26e9b1323..af44311085 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -1498,7 +1498,6 @@ void MidiRegionView::update_note (CanvasNote* ev, bool update_ghost_regions) { boost::shared_ptr<NoteType> note = ev->note(); - const double x = trackview.editor().frame_to_pixel (source_beats_to_region_frames (note->time())); const double y1 = midi_stream_view()->note_to_y(note->note()); @@ -2302,13 +2301,9 @@ MidiRegionView::note_dropped(CanvasNoteEvent *, frameoffset_t dt, int8_t dnote) start_note_diff_command (_("move notes")); for (Selection::iterator i = _selection.begin(); i != _selection.end() ; ++i) { - - cerr << "Note dropped, was at " << (*i)->note()->time() << " now + " << dt << endl; - cerr << "original pos as frames " << source_beats_to_absolute_frames ((*i)->note()->time()) << endl; - Evoral::MusicalTime new_time = absolute_frames_to_source_beats (source_beats_to_absolute_frames ((*i)->note()->time()) + dt); - - cerr << "new time in beats = " << new_time << endl; + framepos_t new_frames = source_beats_to_absolute_frames ((*i)->note()->time()) + dt; + Evoral::MusicalTime new_time = absolute_frames_to_source_beats (new_frames); if (new_time < 0) { continue; |