diff options
author | David Robillard <d@drobilla.net> | 2015-01-13 23:30:37 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-01-13 23:30:37 -0500 |
commit | d39d4c1c118960fe482caab9a2c10ca06d1aafa6 (patch) | |
tree | c8538b33fbd338eadd4b7f026197d74837c894d8 /gtk2_ardour/editor_drag.h | |
parent | 88e6995b14e83d7f22166abec0656a60b0111424 (diff) |
Fix automation range drag and implement for MIDI.
Range select rect sticks around now after switching to the draw tool, but
disappears if a note selection is made. Not sure if draw is really the most
appropriate tool here (particularly if we ever implement actual pencil-like
drawing); edit contents seems more appropriate but that would probably cause
more selection issues, so here we are.
Diffstat (limited to 'gtk2_ardour/editor_drag.h')
-rw-r--r-- | gtk2_ardour/editor_drag.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gtk2_ardour/editor_drag.h b/gtk2_ardour/editor_drag.h index 260a333ce9..c7c2f23b1a 100644 --- a/gtk2_ardour/editor_drag.h +++ b/gtk2_ardour/editor_drag.h @@ -1041,7 +1041,7 @@ class AutomationRangeDrag : public Drag { public: AutomationRangeDrag (Editor *, AutomationTimeAxisView *, std::list<ARDOUR::AudioRange> const &); - AutomationRangeDrag (Editor *, AudioRegionView *, std::list<ARDOUR::AudioRange> const &); + AutomationRangeDrag (Editor *, RegionView *, std::list<ARDOUR::AudioRange> const &); void start_grab (GdkEvent *, Gdk::Cursor* c = 0); void motion (GdkEvent *, bool); @@ -1054,7 +1054,8 @@ public: private: void setup (std::list<boost::shared_ptr<AutomationLine> > const &); - double y_fraction (boost::shared_ptr<AutomationLine>, double global_y_position) const; + double y_fraction (boost::shared_ptr<AutomationLine>, double global_y_position) const; + double value (boost::shared_ptr<ARDOUR::AutomationList> list, double x) const; std::list<ARDOUR::AudioRange> _ranges; @@ -1068,8 +1069,9 @@ private: }; std::list<Line> _lines; - double y_origin; - bool _nothing_to_drag; + double _y_origin; + bool _nothing_to_drag; + bool _integral; }; /** Drag of one edge of an xfade |