13
0

Keep automation lines within their parent (#6215).

This commit is contained in:
David Robillard 2015-03-26 11:48:13 -04:00
parent 7e2c8ace4b
commit 3b38d7d8a6
3 changed files with 4 additions and 4 deletions

View File

@ -105,7 +105,7 @@ AutomationLine::AutomationLine (const string& name,
terminal_points_can_slide = true; terminal_points_can_slide = true;
_height = 0; _height = 0;
group = new ArdourCanvas::Container (&parent); group = new ArdourCanvas::Container (&parent, ArdourCanvas::Duple(0, 1.5));
CANVAS_DEBUG_NAME (group, "region gain envelope group"); CANVAS_DEBUG_NAME (group, "region gain envelope group");
line = new ArdourCanvas::PolyLine (group); line = new ArdourCanvas::PolyLine (group);

View File

@ -96,7 +96,7 @@ AutomationRegionView::create_line (boost::shared_ptr<ARDOUR::AutomationList> lis
_parameter, _parameter,
&_source_relative_time_converter)); &_source_relative_time_converter));
_line->set_colors(); _line->set_colors();
_line->set_height ((uint32_t)rint(trackview.current_height() - NAME_HIGHLIGHT_SIZE)); _line->set_height ((uint32_t)rint(trackview.current_height() - 2.5 - NAME_HIGHLIGHT_SIZE));
_line->set_visibility (AutomationLine::VisibleAspects (AutomationLine::Line|AutomationLine::ControlPoints)); _line->set_visibility (AutomationLine::VisibleAspects (AutomationLine::Line|AutomationLine::ControlPoints));
_line->set_maximum_time (_region->length()); _line->set_maximum_time (_region->length());
_line->set_offset (_region->start ()); _line->set_offset (_region->start ());
@ -235,7 +235,7 @@ AutomationRegionView::set_height (double h)
RegionView::set_height(h); RegionView::set_height(h);
if (_line) { if (_line) {
_line->set_height ((uint32_t)rint(h - NAME_HIGHLIGHT_SIZE)); _line->set_height ((uint32_t)rint(h - 2.5 - NAME_HIGHLIGHT_SIZE));
} }
} }

View File

@ -465,7 +465,7 @@ AutomationTimeAxisView::set_height (uint32_t h, TrackHeightMode m)
_base_rect->set_y1 (h); _base_rect->set_y1 (h);
if (_line) { if (_line) {
_line->set_height(h); _line->set_height(h - 2.5);
} }
if (_view) { if (_view) {