summaryrefslogtreecommitdiff
path: root/gtk2_ardour/midi_region_view.h
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2015-05-23 03:09:48 +1000
committernick_m <mainsbridge@gmail.com>2015-05-23 03:09:48 +1000
commit88477ace25dbf1c65b568be3bfb08dfd67623c13 (patch)
tree864a10c86e4a03c6921bb49946c3df4c9ebd6bfe /gtk2_ardour/midi_region_view.h
parent784abd03e0d0d5ff38dbe2c97c8cce157c39e1d1 (diff)
Fix inverted logic of SnapOff with snap modifiers pressed.
- also clean up, rename and comment some previous hanges.
Diffstat (limited to 'gtk2_ardour/midi_region_view.h')
-rw-r--r--gtk2_ardour/midi_region_view.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/gtk2_ardour/midi_region_view.h b/gtk2_ardour/midi_region_view.h
index 9c39fa1576..4cab6b16bf 100644
--- a/gtk2_ardour/midi_region_view.h
+++ b/gtk2_ardour/midi_region_view.h
@@ -223,8 +223,8 @@ public:
*/
void begin_resizing(bool at_front);
- void update_resizing (NoteBase*, bool, double, bool, double, guint);
- void commit_resizing (NoteBase*, bool, double, bool, double, guint);
+ void update_resizing (NoteBase* primary, bool at_front, double delta_x, bool relative, double snap_delta, bool with_snap);
+ void commit_resizing (NoteBase* primary, bool at_front, double delat_x, bool relative, double snap_delta, bool with_snap);
void abort_resizing ();
/** Change the channel of the selection.
@@ -250,17 +250,18 @@ public:
/** Snap a region relative pixel coordinate to pixel units.
* @param x a pixel coordinate relative to region start
- * @param explicitly do not use magnetic snap (required for snap delta calculation)
+ * @param ensure_snap do not use magnetic snap (required for snap delta calculation)
* @return the snapped pixel coordinate relative to region start
*/
- double snap_to_pixel(double x, bool explicitly = false);
+ double snap_to_pixel(double x, bool ensure_snap = false);
/** Snap a region relative pixel coordinate to frame units.
* @param x a pixel coordinate relative to region start
- * @param explicitly do not use magnetic snap (required for snap delta calculation)
+ * @param ensure_snap ignore SnapOff and magnetic snap.
+ * Required for inverting snap logic with modifier keys and snap delta calculation.
* @return the snapped framepos_t coordinate relative to region start
*/
- framepos_t snap_pixel_to_sample(double x, bool explicitly = false);
+ framepos_t snap_pixel_to_sample(double x, bool ensure_snap = false);
/** Convert a timestamp in beats into frames (both relative to region position) */
framepos_t region_beats_to_region_frames(Evoral::Beats beats) const;