From 0a84c822d53cda902f339af8d2fb2a0e40b15b30 Mon Sep 17 00:00:00 2001 From: zach Date: Tue, 19 May 2026 03:50:24 +0200 Subject: [PATCH] update blobs --- Plugins/ZShell/Blobs/blobgroup.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Plugins/ZShell/Blobs/blobgroup.cpp b/Plugins/ZShell/Blobs/blobgroup.cpp index e77cf05..a24a750 100644 --- a/Plugins/ZShell/Blobs/blobgroup.cpp +++ b/Plugins/ZShell/Blobs/blobgroup.cpp @@ -73,7 +73,9 @@ void BlobGroup::markShapeDirty(BlobShape* source) { source->polish(); source->update(); - // Use cached padded rects to find spatial neighbors + // Use actual current geometry (not cached rects) to find spatial neighbors. + // Cached rects can be stale when multiple shapes move simultaneously, + // causing the blob background to desync from panels that changed size. const float pad = static_cast(m_smoothing) * 2.0f; const QRectF srcRect(static_cast(source->m_cachedPaddedX - pad), static_cast(source->m_cachedPaddedY - pad), static_cast(source->m_cachedPaddedW + pad * 2.0f), @@ -82,8 +84,9 @@ void BlobGroup::markShapeDirty(BlobShape* source) { for (auto* shape : std::as_const(m_shapes)) { if (shape == source) continue; - const QRectF otherRect(static_cast(shape->m_cachedPaddedX), static_cast(shape->m_cachedPaddedY), - static_cast(shape->m_cachedPaddedW), static_cast(shape->m_cachedPaddedH)); + const QPointF shapeScene = shape->mapToScene(QPointF(0, 0)); + const QRectF otherRect(shapeScene.x(), shapeScene.y(), + static_cast(shape->width()), static_cast(shape->height())); if (srcRect.intersects(otherRect)) { shape->polish(); shape->update();