diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2010-08-18 08:00:48 (GMT) |
---|---|---|
committer | Jiang Jiang <jiang.jiang@nokia.com> | 2010-08-18 09:55:09 (GMT) |
commit | 3e4f85dbbdb8b8a62e33f8680b0cc87ce2ed9e7e (patch) | |
tree | d5ad220f2d9e3521cabcba92e28d4be06d6030b3 /src/gui/text | |
parent | 9c1dc504c8f12858ab9c0b610bebb19019005eaa (diff) | |
download | Qt-3e4f85dbbdb8b8a62e33f8680b0cc87ce2ed9e7e.zip Qt-3e4f85dbbdb8b8a62e33f8680b0cc87ce2ed9e7e.tar.gz Qt-3e4f85dbbdb8b8a62e33f8680b0cc87ce2ed9e7e.tar.bz2 |
respect the layout direction in the default text option
This fixes a regression against 4.6 where setting the
default layout direction for rich text got ignored
Task-number: QT-3566
Reviewed-by: Jiang Jiang
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qtextobject.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp index 5fb3384..d25fb05 100644 --- a/src/gui/text/qtextobject.cpp +++ b/src/gui/text/qtextobject.cpp @@ -1156,6 +1156,10 @@ Qt::LayoutDirection QTextBlock::textDirection() const if (dir != Qt::LayoutDirectionAuto) return dir; + dir = p->defaultTextOption.textDirection(); + if (dir != Qt::LayoutDirectionAuto) + return dir; + const QString buffer = p->buffer(); const int pos = position(); |