From 9f89f57090200e09f7f42462915b46596771b754 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Tue, 7 Apr 2020 02:34:59 +1000 Subject: [PATCH] track: when length changes, force the new area to invalidate The track limits cache invalidation signals to the length of the track. On some platforms, if a block length was changed to the point that it changed the track length, the track length would change AFTER the cache invalidation and therefore never end up getting rendered. This commit ensures that when a track's length changes, the new section is invalidated regardless of ordering. --- app/node/output/track/track.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/node/output/track/track.cpp b/app/node/output/track/track.cpp index 7b432013c..32fc313c0 100644 --- a/app/node/output/track/track.cpp +++ b/app/node/output/track/track.cpp @@ -450,8 +450,13 @@ void TrackOutput::UpdateInOutFrom(int index) // Update track length if (new_track_length != track_length_) { + rational old_track_length = track_length_; + track_length_ = new_track_length; emit TrackLengthChanged(); + + InvalidateCache(qMin(old_track_length, new_track_length), + qMax(old_track_length, new_track_length)); } }