From 3200cf3fee62e3ed7e70af28459fe874116afe11 Mon Sep 17 00:00:00 2001 From: Pascal Thomet Date: Sat, 9 Mar 2024 12:53:27 +0100 Subject: [PATCH] Fix UpdateLinkedZooms (do not update twice) --- src/immvision/internal/image_cache.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/immvision/internal/image_cache.cpp b/src/immvision/internal/image_cache.cpp index ada7876..848ac44 100644 --- a/src/immvision/internal/image_cache.cpp +++ b/src/immvision/internal/image_cache.cpp @@ -239,6 +239,10 @@ namespace ImmVision for (auto& otherCacheKey : mCacheParams.Keys()) { CachedParams & otherCache = mCacheParams.Get(otherCacheKey); + + if (otherCache.ParamsPtr == currentCache.ParamsPtr) + continue; + if ((otherCacheKey != id) && (otherCache.ParamsPtr->ZoomKey == zoomKey)) { cv::Size otherDisplayedImageSize = otherCache.ParamsPtr->ImageDisplaySize;