Stop editor summary viewbox being moved too far down in y.
git-svn-id: svn://localhost/ardour2/branches/3.0@6253 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
2ee9fb4d33
commit
ce2d9cb4aa
@ -453,8 +453,26 @@ EditorSummary::set_editor (pair<double,double> const & x, pair<double, double> c
|
||||
is merely pending but not executing. But c'est la vie.
|
||||
*/
|
||||
|
||||
/* proposed bottom of the editor with the requested position */
|
||||
double const pb = y.second / _y_scale;
|
||||
|
||||
/* bottom of the canvas */
|
||||
double const ch = _editor->full_canvas_height - _editor->canvas_timebars_vsize;
|
||||
|
||||
/* requested y position */
|
||||
double ly = y.first / _y_scale;
|
||||
|
||||
/* clamp y position so as not to go off the bottom */
|
||||
if (pb > ch) {
|
||||
ly -= (pb - ch);
|
||||
}
|
||||
|
||||
if (ly < 0) {
|
||||
ly = 0;
|
||||
}
|
||||
|
||||
_editor->reset_x_origin (x.first / _x_scale + _start);
|
||||
_editor->reset_y_origin (y.first / _y_scale);
|
||||
_editor->reset_y_origin (ly);
|
||||
|
||||
double const nx = (
|
||||
((x.second - x.first) / _x_scale) /
|
||||
|
Loading…
Reference in New Issue
Block a user