From 29ddbd6f3021bd69a7badedc9749850ec1c1dabf Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Mon, 4 Oct 2010 11:59:38 +1000 Subject: Fix clipping behavior for non-cached text. --- src/declarative/graphicsitems/qdeclarativetext.cpp | 2 +- src/declarative/graphicsitems/qdeclarativetext_p_p.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index c2dd850..65f1564 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -1143,7 +1143,7 @@ void QDeclarativeText::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWid } else { qreal y = boundingRect().y(); - bool needClip = !clip() && (d->cachedLayoutSize.width() > width() || + bool needClip = clip() && (d->cachedLayoutSize.width() > width() || d->cachedLayoutSize.height() > height()); if (needClip) { diff --git a/src/declarative/graphicsitems/qdeclarativetext_p_p.h b/src/declarative/graphicsitems/qdeclarativetext_p_p.h index ba1ec78..db68558 100644 --- a/src/declarative/graphicsitems/qdeclarativetext_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativetext_p_p.h @@ -66,7 +66,6 @@ QT_BEGIN_NAMESPACE class QTextLayout; class QTextDocumentWithImageResources; -#define QML_NO_TEXT_CACHE class QDeclarativeTextPrivate : public QDeclarativeItemPrivate { Q_DECLARE_PUBLIC(QDeclarativeText) -- cgit v0.12