diff options
author | Gunnar Sletta <gunnar.sletta@digia.com> | 2013-05-13 16:02:30 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-14 22:22:28 +0200 |
commit | e12ebce572ff5dd624477bf5d3dff84242f2e175 (patch) | |
tree | 96097cf9f45d5575a981a2eca8d04facba2a3bc0 /src/quick/scenegraph/qsgdefaultglyphnode_p.cpp | |
parent | c4123d8e3843709cfab043d2ba0d5999682595b8 (diff) |
Fix sorting of QSGTextMaskMaterial (native glyph drawing).
It seems we were hitting the bool operator rather than the
pointer values so all text materials, regardless of size
or style would return equal.
Change-Id: I8773e5aa965035f6737920747c2cf073929ff799
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/quick/scenegraph/qsgdefaultglyphnode_p.cpp')
-rw-r--r-- | src/quick/scenegraph/qsgdefaultglyphnode_p.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp index 3df11532e4..f5a461f19e 100644 --- a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp +++ b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp @@ -521,7 +521,7 @@ int QSGTextMaskMaterial::compare(const QSGMaterial *o) const Q_ASSERT(o && type() == o->type()); const QSGTextMaskMaterial *other = static_cast<const QSGTextMaskMaterial *>(o); if (m_glyphCache != other->m_glyphCache) - return m_glyphCache - other->m_glyphCache; + return m_glyphCache.data() < other->m_glyphCache.data() ? -1 : 1; QRgb c1 = m_color.rgba(); QRgb c2 = other->m_color.rgba(); return int(c2 < c1) - int(c1 < c2); |