diff --git a/Plugins/ZShell/Blobs/blobshape.cpp b/Plugins/ZShell/Blobs/blobshape.cpp index 69d9ea6..0265da0 100644 --- a/Plugins/ZShell/Blobs/blobshape.cpp +++ b/Plugins/ZShell/Blobs/blobshape.cpp @@ -166,22 +166,22 @@ void BlobShape::updatePolish() { if (isExcluded(other)) continue; - const QPointF otherScene = other->mapToScene(QPointF(0, 0)); + const QPointF otherScene = other->mapToScene(QPointF(0, 0)); + const float otherHW = static_cast(other->width()) * 0.5f; + const float otherHH = static_cast(other->height()) * 0.5f; + const float otherPad = pad + deformPadding(other->m_deformMatrix, otherHW, otherHH); + const QRectF otherPadded(otherScene.x() - static_cast(otherPad), + otherScene.y() - static_cast(otherPad), other->width() + 2.0 * static_cast(otherPad), + other->height() + 2.0 * static_cast(otherPad)); -bool include = false; - if (isInvertedRect()) { - include = true; - } else if (m_hasExpandedRect) { - include = m_expandedRect.intersects(otherPadded); - } else { - const float otherHW = static_cast(other->width()) * 0.5f; - const float otherHH = static_cast(other->height()) * 0.5f; - const float otherPad = pad + deformPadding(other->m_deformMatrix, otherHW, otherHH); - const QRectF otherPadded(otherScene.x() - static_cast(otherPad), - otherScene.y() - static_cast(otherPad), other->width() + 2.0 * static_cast(otherPad), - other->height() + 2.0 * static_cast(otherPad)); - include = myPadded.intersects(otherPadded); - } + bool include = false; + if (isInvertedRect()) { + include = true; + } else if (m_hasExpandedRect) { + include = m_expandedRect.intersects(otherPadded); + } else { + include = myPadded.intersects(otherPadded); + } if (include) { if (other == this)