summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2010-10-29 05:26:50 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2010-10-29 05:28:16 (GMT)
commit95ef9a3d7eb851d47dabe3248672ea03e5faa0ce (patch)
treed0f7cdb36472ce88d18bf931b8243e4fda99553f /src/declarative/graphicsitems
parent8e3a0c2df1cff2ca960555ad16654ff77f7efcc8 (diff)
downloadQt-95ef9a3d7eb851d47dabe3248672ea03e5faa0ce.zip
Qt-95ef9a3d7eb851d47dabe3248672ea03e5faa0ce.tar.gz
Qt-95ef9a3d7eb851d47dabe3248672ea03e5faa0ce.tar.bz2
Regression: horizontal alignment bug with single line text
Task-number: QTBUG-14841
Diffstat (limited to 'src/declarative/graphicsitems')
-rw-r--r--src/declarative/graphicsitems/qdeclarativetext.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp
index 865af2d..03c9765 100644
--- a/src/declarative/graphicsitems/qdeclarativetext.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetext.cpp
@@ -292,12 +292,12 @@ QSize QDeclarativeTextPrivate::setupTextLayout()
qreal lineWidth = 0;
//set manual width
- if ((wrapMode != QDeclarativeText::NoWrap || elideMode != QDeclarativeText::ElideNone) && q->widthValid())
+ if (q->widthValid())
lineWidth = q->width();
QTextOption textOption = layout.textOption();
textOption.setWrapMode(QTextOption::WrapMode(wrapMode));
- textOption.setAlignment((Qt::Alignment)hAlign);
+ textOption.setAlignment(Qt::Alignment(hAlign));
layout.setTextOption(textOption);
layout.beginLayout();
@@ -306,7 +306,7 @@ QSize QDeclarativeTextPrivate::setupTextLayout()
if (!line.isValid())
break;
- if ((wrapMode != QDeclarativeText::NoWrap || elideMode != QDeclarativeText::ElideNone) && q->widthValid()) {
+ if (q->widthValid()) {
line.setLineWidth(lineWidth);
line.setPosition(QPointF(0, height));
height += line.height();