13
0

Fix underflow in layer_t with rubber band selection on multiple tracks with stacked region display (#4103).

git-svn-id: svn://localhost/ardour2/branches/3.0@10286 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2011-10-22 22:10:37 +00:00
parent 6d66f90c5c
commit 12f443c721

View File

@ -523,8 +523,21 @@ StreamView::get_selectables (framepos_t start, framepos_t end, double top, doubl
if (_layer_display == Stacked) {
double const c = child_height ();
min_layer = _layers - ((bottom - _trackview.y_position()) / c);
max_layer = _layers - ((top - _trackview.y_position()) / c);
int const mi = _layers - ((bottom - _trackview.y_position()) / c);
if (mi < 0) {
min_layer = 0;
} else {
min_layer = mi;
}
int const ma = _layers - ((top - _trackview.y_position()) / c);
if (ma > _layers) {
max_layer = _layers - 1;
} else {
max_layer = ma;
}
}
for (list<RegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {