Skip to content

Commit

Permalink
Show text ellipses when font is below minimum size
Browse files Browse the repository at this point in the history
  • Loading branch information
adeas31 committed Nov 19, 2019
1 parent 0c73ae2 commit 028aa55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OMEdit/OMEditLIB/Annotations/TextAnnotation.cpp
Expand Up @@ -373,7 +373,7 @@ void TextAnnotation::drawTextAnnotaion(QPainter *painter)
* If the shape is not part of Component then only try to get the elided text if its font size <= Helper::minimumTextFontSize
*/
QString textToDraw = mTextString;
if (absMappedBoundingRect.width() > 1 && (mpComponent || (!mpComponent && painter->font().pointSizeF() <= Helper::minimumTextFontSize))) {
if (absMappedBoundingRect.width() > 1 && painter->font().pointSizeF() <= Helper::minimumTextFontSize) {
QFontMetrics fontMetrics(painter->font());
textToDraw = fontMetrics.elidedText(mTextString, Qt::ElideRight, absMappedBoundingRect.width());
}
Expand Down

0 comments on commit 028aa55

Please sign in to comment.