13
0

don't invalidate image cache for every regionr esize, only region start changes

This commit is contained in:
Paul Davis 2013-04-25 09:48:38 -04:00
parent d0867e67e3
commit fd7ac62ca5

View File

@ -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 ();