* Prevent plasma tooltips to draw halos on empty lines.

Closes review request #6233

svn path=/trunk/KDE/kdelibs/; revision=1210143
This commit is contained in:
Diego Casella 2010-12-29 19:36:24 +00:00
parent c56c74054f
commit a894b07bce

View File

@ -91,7 +91,11 @@ public:
QTextLine line;
for (int i = 0; i < layout->lineCount(); ++i) {
line = layout->lineAt(i);
m_haloRects.append(line.naturalTextRect().translated(layout->position().toPoint()).toRect().translated(m_margin, m_margin));
// Add halo rect only when a non empty line is found
if (line.naturalTextWidth()) {
m_haloRects.append(line.naturalTextRect().translated(layout->position().toPoint()).toRect().translated(m_margin, m_margin));
}
}
update();