mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
commit crash caused by not displaying first and last points of an automation line at large zooms
git-svn-id: svn://localhost/ardour2/trunk@1047 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
dc40809648
commit
2001efa088
2 changed files with 6 additions and 7 deletions
|
|
@ -155,8 +155,6 @@ AudioRegionView::init (Gdk::Color& basic_color, bool wfd)
|
||||||
|
|
||||||
gain_line = new AudioRegionGainLine (foo, trackview.session(), *this, *group, audio_region()->envelope());
|
gain_line = new AudioRegionGainLine (foo, trackview.session(), *this, *group, audio_region()->envelope());
|
||||||
|
|
||||||
cerr << "Initializing RV for " << audio_region()->name() << " with " << audio_region()->envelope().size() << " points\n";
|
|
||||||
|
|
||||||
if (!(_flags & EnvelopeVisible)) {
|
if (!(_flags & EnvelopeVisible)) {
|
||||||
gain_line->hide ();
|
gain_line->hide ();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -746,10 +746,13 @@ AutomationLine::determine_visible_control_points (ALPoints& points)
|
||||||
this_rx = (uint32_t) rint (tx);
|
this_rx = (uint32_t) rint (tx);
|
||||||
this_ry = (uint32_t) rint (ty);
|
this_ry = (uint32_t) rint (ty);
|
||||||
|
|
||||||
if (view_index && pi != npoints && (this_rx == prev_rx) && (this_ry == prev_ry) ||
|
if (view_index && pi != npoints && /* not the first, not the last */
|
||||||
((this_rx - prev_rx) < (box_size + 2))) {
|
|
||||||
|
/* same point or too close to the last one horizontally */
|
||||||
|
|
||||||
|
(((this_rx == prev_rx) && (this_ry == prev_ry)) || ((this_rx - prev_rx) < (box_size + 2)))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ok, we should display this point */
|
/* ok, we should display this point */
|
||||||
|
|
||||||
|
|
@ -811,8 +814,6 @@ AutomationLine::determine_visible_control_points (ALPoints& points)
|
||||||
|
|
||||||
/* discard extra CP's to avoid confusing ourselves */
|
/* discard extra CP's to avoid confusing ourselves */
|
||||||
|
|
||||||
cerr << "here we are, view_index = " << view_index << " cp size = " << control_points.size() << " np = " << npoints << endl;
|
|
||||||
|
|
||||||
while (control_points.size() > view_index) {
|
while (control_points.size() > view_index) {
|
||||||
ControlPoint* cp = control_points.back();
|
ControlPoint* cp = control_points.back();
|
||||||
control_points.pop_back ();
|
control_points.pop_back ();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue