diff --git a/src/nodes/QskBoxShadowNode.cpp b/src/nodes/QskBoxShadowNode.cpp index 44a1af50..17c3a5c5 100644 --- a/src/nodes/QskBoxShadowNode.cpp +++ b/src/nodes/QskBoxShadowNode.cpp @@ -230,12 +230,12 @@ int Material::compare( const QSGMaterial* other ) const { auto material = static_cast< const Material* >( other ); - if ( material->m_color != m_color - || material->m_aspect != m_aspect - || !qFuzzyCompare(material->m_blurExtent, m_blurExtent) - || !qFuzzyCompare(material->m_radius, m_radius) ) + if ( ( material->m_color == m_color ) + && ( material->m_aspect == m_aspect ) + && qFuzzyCompare(material->m_blurExtent, m_blurExtent) + && qFuzzyCompare(material->m_radius, m_radius) ) { - return 1; + return 0; } return QSGMaterial::compare( other );