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 <eskil.abrahamsen-blomfeldt@nokia.com>
This commit is contained in:
C. Boemann 2012-01-10 20:09:58 +01:00 committed by Qt by Nokia
parent bf805455d4
commit efc355e8ed

View File

@ -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: