From 4b0f72e2052cb6f377d6b22d201bbf7cffe207b9 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 22 Dec 2020 05:54:55 +0100 Subject: [PATCH] Do not bother to render waveforms < 2px high Those are blank to begin with, nothing is drawn, yet they'd still be cached. This may happen during an initial exposure (see 1a49d7d42b86227), or when deleting regions. --- libs/waveview/wave_view.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/waveview/wave_view.cc b/libs/waveview/wave_view.cc index 127f108069..3a5c1b4fc0 100644 --- a/libs/waveview/wave_view.cc +++ b/libs/waveview/wave_view.cc @@ -1016,7 +1016,11 @@ WaveView::render (Rect const & area, Cairo::RefPtr context) cons Rect self; if (!get_item_and_draw_rect_in_window_coords (area, self, draw)) { - assert(true); + assert(false); + return; + } + + if (draw.height () < 2) { return; }