diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-01-04 02:49:01 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-01-04 02:49:01 +0000 |
commit | b1a33855ce4254ebbee4f273bb74ceb50628ed05 (patch) | |
tree | 01dffa7f7b41545e45fe6cda8787cdac507a3edc /gtk2_ardour/midi_region_view.cc | |
parent | 10d9eaf0bd0f40d5bd272268dbac20908557ad71 (diff) |
use BBTPoint::is_bar() rather than ::beat == 1 ; implement TempoMap::framepos_plus_{beats,bbt}() with new map structure (not totally finished or accurate yet); prevent crash when dragging a marker to replace the initial tempo/meter markers
git-svn-id: svn://localhost/ardour2/branches/3.0@11154 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/midi_region_view.cc')
-rw-r--r-- | gtk2_ardour/midi_region_view.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index 0437b4b938..d26e9b1323 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -2303,8 +2303,13 @@ MidiRegionView::note_dropped(CanvasNoteEvent *, frameoffset_t dt, int8_t dnote) 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; + if (new_time < 0) { continue; } |