Addded textRectFactor min value.
authorJussi Laitinen <jupe@l3l7588.ixonos.local>
Thu, 12 Aug 2010 13:32:28 +0000 (16:32 +0300)
committerJussi Laitinen <jupe@l3l7588.ixonos.local>
Thu, 12 Aug 2010 13:32:28 +0000 (16:32 +0300)
src/ui/extendedlistitem.cpp

index 158e746..4709de3 100644 (file)
@@ -104,7 +104,7 @@ QRect ExtendedListItem::calculateExpandedTextRect(const QString &text)
     textRectFactor += textRect.height() / SUBITEM_TEXT_ROW_HEIGHT;
 
     QRect expandedTextRect = QRect(0, 0, m_subItemTextWidth, SUBITEM_TEXT_ROW_HEIGHT
-                                   * textRectFactor);
+                                   * qMax(textRectFactor, 1));
 
     m_normalHeight += SUBITEM_TEXT_ROW_HEIGHT + TEXT_BOTTOM_MARGIN;
     m_expandedHeight += expandedTextRect.height() + TEXT_BOTTOM_MARGIN;