From b8e336b973bca15c7d4ae6e78739af2a68488a4e Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 21 Dec 2020 21:12:53 +0100 Subject: [PATCH] Add API to clear waveform cache --- libs/waveview/wave_view.cc | 6 ++++++ libs/waveview/waveview/wave_view.h | 1 + 2 files changed, 7 insertions(+) diff --git a/libs/waveview/wave_view.cc b/libs/waveview/wave_view.cc index 2ada911244..127f108069 100644 --- a/libs/waveview/wave_view.cc +++ b/libs/waveview/wave_view.cc @@ -1324,6 +1324,12 @@ WaveView::set_global_logscaled (bool yn) } } +void +WaveView::clear_cache () +{ + WaveViewCache::get_instance()->clear_cache (); +} + samplecnt_t WaveView::region_length() const { diff --git a/libs/waveview/waveview/wave_view.h b/libs/waveview/waveview/wave_view.h index 6a8012b5e4..bca9007c3a 100644 --- a/libs/waveview/waveview/wave_view.h +++ b/libs/waveview/waveview/wave_view.h @@ -125,6 +125,7 @@ public: static void set_global_logscaled (bool); static void set_global_shape (Shape); static void set_global_show_waveform_clipping (bool); + static void clear_cache (); static double global_gradient_depth () { return _global_gradient_depth; }