mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-03 04:09:29 +01:00
clamp zoom level to show 3 days on a 4000 pixel wide screen; comment unused variable for now
This commit is contained in:
parent
5ee4f41925
commit
18190eaa5e
1 changed files with 18 additions and 3 deletions
|
|
@ -1364,7 +1364,7 @@ Editor::scroll_down_one_track ()
|
|||
bool
|
||||
Editor::scroll_up_one_track ()
|
||||
{
|
||||
double vertical_pos = vertical_adjustment.get_value ();
|
||||
// double vertical_pos = vertical_adjustment.get_value ();
|
||||
|
||||
TrackViewList::iterator prev = track_views.end();
|
||||
std::pair<TimeAxisView*,double> res;
|
||||
|
|
@ -1458,8 +1458,23 @@ Editor::clamp_samples_per_pixel (framecnt_t& fpp) const
|
|||
clamped = true;
|
||||
}
|
||||
|
||||
if (max_framepos / fpp < 800) {
|
||||
fpp = max_framepos / 800;
|
||||
framecnt_t sr;
|
||||
|
||||
if (_session) {
|
||||
sr = _session->frame_rate ();
|
||||
} else {
|
||||
sr = 48000;
|
||||
}
|
||||
|
||||
const framecnt_t three_days = 3 * 24 * 60 * 60 * sr;
|
||||
const framecnt_t lots_of_pixels = 4000;
|
||||
|
||||
/* if the zoom level is greater than what you'd get trying to display 3
|
||||
* days of audio on a really big screen, scale it down.
|
||||
*/
|
||||
|
||||
if (fpp * lots_of_pixels > three_days) {
|
||||
fpp = three_days / _track_canvas->width();
|
||||
clamped = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue