summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2010-08-18 10:00:48 +0200
committerJiang Jiang <jiang.jiang@nokia.com>2010-08-18 11:55:09 +0200
commit3e4f85dbbdb8b8a62e33f8680b0cc87ce2ed9e7e (patch)
treed5ad220f2d9e3521cabcba92e28d4be06d6030b3 /src/gui/text/qtextobject.cpp
parent9c1dc504c8f12858ab9c0b610bebb19019005eaa (diff)
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/qtextobject.cpp')
-rw-r--r--src/gui/text/qtextobject.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp
index 5fb3384d51..d25fb057c6 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();