From 3e4f85dbbdb8b8a62e33f8680b0cc87ce2ed9e7e Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 18 Aug 2010 10:00:48 +0200 Subject: 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 --- src/gui/text/qtextobject.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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(); -- cgit v0.12