prwevent scroll-driven zoom in pianoroll from exceeding a reasonable level
This commit is contained in:
@@ -2498,6 +2498,13 @@ EditingContext::reset_y_origin (double y)
|
||||
void
|
||||
EditingContext::reset_zoom (samplecnt_t spp)
|
||||
{
|
||||
std::pair<timepos_t, timepos_t> ext = max_zoom_extent();
|
||||
samplecnt_t max_extents_pp = (ext.second.samples() - ext.first.samples()) / _visible_canvas_width;
|
||||
|
||||
if (spp > max_extents_pp) {
|
||||
spp = max_extents_pp;
|
||||
}
|
||||
|
||||
if (spp == samples_per_pixel) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user