diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2019-02-12 21:23:01 -0600 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2019-02-12 21:23:01 -0600 |
commit | b24fef38b2ea43fa3f98701b78068aa93336cb48 (patch) | |
tree | 34d3f89aff393d3e2197fad0b33c01076ac9f77c /gtk2_ardour/editor_drag.cc | |
parent | 08f51e72d5676f1466f83cdcdd9c779656e006e4 (diff) |
Fix for automation-line edits using the Range+Draw tool, when no line is already present.
Diffstat (limited to 'gtk2_ardour/editor_drag.cc')
-rw-r--r-- | gtk2_ardour/editor_drag.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index 4abcff6141..2449bb5752 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -6262,6 +6262,15 @@ AutomationRangeDrag::setup (list<boost::shared_ptr<AutomationLine> > const & lin pair<samplepos_t, samplepos_t> r = (*i)->get_point_x_range (); + //need a special detection for automation lanes (not region gain line) + //TODO: if we implement automation regions, this check can probably be removed + AudioRegionGainLine *argl = dynamic_cast<AudioRegionGainLine*> ((*i).get()); + if (!argl) { + //in automation lanes, the EFFECTIVE range should be considered 0->max_samplepos (even if there is no line) + r.first = 0; + r.second = max_samplepos; + } + /* check this range against all the AudioRanges that we are using */ list<AudioRange>::const_iterator k = _ranges.begin (); while (k != _ranges.end()) { |