diff --git a/scwx-qt/source/scwx/qt/manager/timeline_manager.cpp b/scwx-qt/source/scwx/qt/manager/timeline_manager.cpp index 2df72d32..667fa4dd 100644 --- a/scwx-qt/source/scwx/qt/manager/timeline_manager.cpp +++ b/scwx-qt/source/scwx/qt/manager/timeline_manager.cpp @@ -1,3 +1,5 @@ +#define NOMINMAX + #include #include #include @@ -392,9 +394,10 @@ void TimelineManager::Impl::UpdateCacheLimit( auto endIter = util::GetBoundedElementIterator(volumeTimes, endTime); std::size_t numVolumeScans = std::distance(startIter, endIter) + 1; - // Dynamically update maximum cached volume scans to 1.5x the loop length - radarProductManager->SetCacheLimit( - static_cast(numVolumeScans * 1.5)); + // Dynamically update maximum cached volume scans to the lesser of + // either 1.5x the loop length or 5 greater than the loop length + radarProductManager->SetCacheLimit(std::min( + static_cast(numVolumeScans * 1.5), numVolumeScans + 5u)); } void TimelineManager::Impl::Play()