From 0ca8b26af77b883d2fa2fbf26ea8f946c2985458 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 3 Jul 2025 22:00:33 -0600 Subject: [PATCH] minor code simplification --- gtk2_ardour/pianoroll.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gtk2_ardour/pianoroll.cc b/gtk2_ardour/pianoroll.cc index 754b6f860b..bf0f2c2e7a 100644 --- a/gtk2_ardour/pianoroll.cc +++ b/gtk2_ardour/pianoroll.cc @@ -2683,11 +2683,7 @@ Pianoroll::zoom_to_show (Temporal::timecnt_t const & duration) return; } - /* make it 20% wider than we need */ - samplecnt_t samples = duration.samples(); - samplecnt_t spp = floor (samples / _track_canvas_width); - - reset_zoom (spp); + reset_zoom ((samplecnt_t) floor (duration.samples() / _track_canvas_width)); } bool