diff options
author | Carl Hetherington <carl@carlh.net> | 2010-08-20 22:43:10 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-08-20 22:43:10 +0000 |
commit | 822ee79d840f20036b5729277f90e641cb0bb06f (patch) | |
tree | 404c5ce1e05c0b3fdca2473910974de5ddf9aed7 /gtk2_ardour/automation_region_view.cc | |
parent | b2bf4eee3d9ca63a34415c75e877b8c97d6b5f13 (diff) |
Limit region-based automation to the edges of regions. Fixes #3201.
git-svn-id: svn://localhost/ardour2/branches/3.0@7662 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/automation_region_view.cc')
-rw-r--r-- | gtk2_ardour/automation_region_view.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gtk2_ardour/automation_region_view.cc b/gtk2_ardour/automation_region_view.cc index a576101048..2cc3059350 100644 --- a/gtk2_ardour/automation_region_view.cc +++ b/gtk2_ardour/automation_region_view.cc @@ -86,6 +86,7 @@ AutomationRegionView::create_line (boost::shared_ptr<ARDOUR::AutomationList> lis _line->set_height ((uint32_t)rint(trackview.current_height() - NAME_HIGHLIGHT_SIZE)); _line->show(); _line->show_all_control_points(); + _line->set_maximum_time (_region->length()); } bool @@ -177,6 +178,10 @@ AutomationRegionView::set_height (double h) bool AutomationRegionView::set_position (nframes64_t pos, void* src, double* ignored) { + if (_line) { + _line->set_maximum_time (_region->length ()); + } + return RegionView::set_position(pos, src, ignored); } @@ -186,8 +191,9 @@ AutomationRegionView::reset_width_dependent_items (double pixel_width) { RegionView::reset_width_dependent_items(pixel_width); - if (_line) + if (_line) { _line->reset(); + } } @@ -196,8 +202,10 @@ AutomationRegionView::region_resized (const PBD::PropertyChange& what_changed) { RegionView::region_resized(what_changed); - if (_line) + if (_line) { _line->reset(); + _line->set_maximum_time (_region->length()); + } } |