summaryrefslogtreecommitdiff
path: root/gtk2_ardour/midi_region_view.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-09-28 00:47:37 +0000
committerCarl Hetherington <carl@carlh.net>2011-09-28 00:47:37 +0000
commitb85e065069ee5aa35beb86ff9c89562d81af0e07 (patch)
tree4dfea7ec23160b1db653ffe6e56ac779914ff9ce /gtk2_ardour/midi_region_view.cc
parentde53e1154b2ebdc050b390b2df760177b8f57c90 (diff)
More debug removal. Also fix ghost note position on non-zero-start regions (#4337).
git-svn-id: svn://localhost/ardour2/branches/3.0@10152 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/midi_region_view.cc')
-rw-r--r--gtk2_ardour/midi_region_view.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc
index 995a8d194f..958fa885d5 100644
--- a/gtk2_ardour/midi_region_view.cc
+++ b/gtk2_ardour/midi_region_view.cc
@@ -1562,8 +1562,6 @@ MidiRegionView::update_note (CanvasNote* ev, bool update_ghost_regions)
ev->property_x2() = trackview.editor().frame_to_pixel (_region->length());
}
- cerr << ev->property_x2() << endl;
-
ev->property_y2() = y1 + floor(midi_stream_view()->note_height());
if (note->length() == 0) {
@@ -3332,9 +3330,9 @@ MidiRegionView::update_ghost_note (double x, double y)
double length = region_frames_to_region_beats (snap_frame_to_frame (f + grid_frames) - f);
/* note that this sets the time of the ghost note in beats relative to
- the start of the region.
+ the start of the source; that is how all note times are stored.
*/
- _ghost_note->note()->set_time (region_frames_to_region_beats (f));
+ _ghost_note->note()->set_time (absolute_frames_to_source_beats (f + _region->position ()));
_ghost_note->note()->set_length (length);
_ghost_note->note()->set_note (midi_stream_view()->y_to_note (y));
_ghost_note->note()->set_channel (mtv->get_channel_for_add ());