From 3d05dea965dac69f9ee040a8ac0930b89a883593 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 29 Sep 2025 18:35:49 +0200 Subject: [PATCH] Stopgap solution for pianoroll zoom FPE It should be impossible to zoom to < 1 sample/pixel, but apparently some users manage this using elaborate scroll+zoom tricks to be tracked down. --- gtk2_ardour/pianoroll.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gtk2_ardour/pianoroll.cc b/gtk2_ardour/pianoroll.cc index 0ac2161f18..008f7e4881 100644 --- a/gtk2_ardour/pianoroll.cc +++ b/gtk2_ardour/pianoroll.cc @@ -698,6 +698,13 @@ Pianoroll::set_samples_per_pixel (samplecnt_t spp) { EC_LOCAL_TEMPO_SCOPE; + assert (spp > 0); +#ifndef NDEBUG + if (spp < 1) { + spp = 1; + } +#endif + CueEditor::set_samples_per_pixel (spp); if (view) {