summaryrefslogtreecommitdiff
path: root/gtk2_ardour/midi_region_view.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-10-22 23:18:59 +0000
committerCarl Hetherington <carl@carlh.net>2011-10-22 23:18:59 +0000
commit81808ac866724dbb710c67523189f748666d43f2 (patch)
tree4880767cec65a0faeabc415f47ae03a2fd271b44 /gtk2_ardour/midi_region_view.cc
parentab024c7601fd38e9f73eba25b7fc95cfbb31016f (diff)
Fix up some comments.
git-svn-id: svn://localhost/ardour2/branches/3.0@10289 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/midi_region_view.cc')
-rw-r--r--gtk2_ardour/midi_region_view.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc
index 59bef05a32..fcab483287 100644
--- a/gtk2_ardour/midi_region_view.cc
+++ b/gtk2_ardour/midi_region_view.cc
@@ -2397,6 +2397,9 @@ MidiRegionView::note_dropped(CanvasNoteEvent *, frameoffset_t dt, int8_t dnote)
}
}
+/** @param x Pixel relative to the region position.
+ * @return Snapped frame relative to the region position.
+ */
framepos_t
MidiRegionView::snap_pixel_to_frame(double x)
{
@@ -2404,6 +2407,9 @@ MidiRegionView::snap_pixel_to_frame(double x)
return snap_frame_to_frame (editor.pixel_to_frame (x));
}
+/** @param x Pixel relative to the region position.
+ * @return Snapped pixel relative to the region position.
+ */
double
MidiRegionView::snap_to_pixel(double x)
{
@@ -2543,9 +2549,6 @@ MidiRegionView::update_resizing (ArdourCanvas::CanvasNoteEvent* primary, bool at
double beats;
beats = snap_pixel_to_frame (current_x);
- /* XXX not sure this is correct - snap_pixel_to_frame()
- returns an absolute frame.
- */
beats = region_frames_to_region_beats (beats);
double len;
@@ -2608,13 +2611,10 @@ MidiRegionView::commit_resizing (ArdourCanvas::CanvasNoteEvent* primary, bool at
}
}
- /* Convert that to a frame within the region */
+ /* Convert that to a frame within the source */
current_x = snap_pixel_to_frame (current_x) + _region->start ();
/* and then to beats */
- /* XXX not sure this is correct - snap_pixel_to_frame()
- returns an absolute frame.
- */
current_x = region_frames_to_region_beats (current_x);
if (at_front && current_x < canvas_note->note()->end_time()) {