summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/canvas/wave_view.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/libs/canvas/wave_view.cc b/libs/canvas/wave_view.cc
index f39dca7594..ac45c2bc7c 100644
--- a/libs/canvas/wave_view.cc
+++ b/libs/canvas/wave_view.cc
@@ -421,8 +421,17 @@ WaveView::region_resized ()
_pre_change_bounding_box = _bounding_box;
- _region_start = _region->start();
- invalidate_whole_cache ();
+ frameoffset_t s = _region->start();
+
+ if (s != _region_start) {
+ /* if the region start changes, the information we have
+ in the image cache is out of date and not useful
+ since it will fragmented into little pieces. invalidate
+ the cache.
+ */
+ _region_start = _region->start();
+ invalidate_whole_cache ();
+ }
_bounding_box_dirty = true;
compute_bounding_box ();