diff options
Diffstat (limited to 'src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp')
-rw-r--r-- | src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp b/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp index 30b4a2f9b8..c66b82c16e 100644 --- a/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp +++ b/src/quick/scenegraph/qsgdistancefieldglyphnode_p.cpp @@ -233,7 +233,11 @@ int QSGDistanceFieldTextMaterial::compare(const QSGMaterial *o) const } QRgb c1 = m_color.rgba(); QRgb c2 = other->m_color.rgba(); - return int(c2 < c1) - int(c1 < c2); + if (c1 != c2) + return int(c2 < c1) - int(c1 < c2); + int t0 = m_texture ? m_texture->textureId : -1; + int t1 = other->m_texture ? other->m_texture->textureId : -1; + return t0 - t1; } |