From efc355e8ed5bf17c5d31ac92728048b8f6706993 Mon Sep 17 00:00:00 2001 From: "C. Boemann" Date: Tue, 10 Jan 2012 20:09:58 +0100 Subject: Fix that right aligned tabs can cause text overlapping Eventhough there is a unittest that shows it shouldn't overlap it does at drawing. I've not been able to figure out why the unittet doesn't fail, but it has before been the case that layout and drawing don't correspond. Change-Id: I13250d0510cd0d963721b05f67ac82b1d499fbac Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/text/qtextengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 0dd8d0bef3..b218e2aae5 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -2526,7 +2526,7 @@ QFixed QTextEngine::calculateTabWidth(int item, QFixed x) const // fall through case QTextOption::RightTab: tab = QFixed::fromReal(tabSpec.position) * dpiScale - length; - if (tab < 0) // default to tab taking no space + if (tab < x) // default to tab taking no space return QFixed(); break; case QTextOption::LeftTab: -- cgit v1.2.3