Skip to content

Commit

Permalink
For oversized width in QgsLayoutItemLabel::adjustSizeToText
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and nyalldawson committed Jan 29, 2020
1 parent e28feaf commit 8425ada
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/layout/qgslayoutitemlabel.cpp
Expand Up @@ -358,7 +358,7 @@ QSizeF QgsLayoutItemLabel::sizeForText() const

double penWidth = frameEnabled() ? ( pen().widthF() / 2.0 ) : 0;

double width = textWidth + 2 * mMarginX + 2 * penWidth + 1;
double width = textWidth + 2 * mMarginX + 2 * penWidth;
double height = fontHeight + 2 * mMarginY + 2 * penWidth;

return mLayout->convertToLayoutUnits( QgsLayoutSize( width, height, QgsUnitTypes::LayoutMillimeters ) );
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.

0 comments on commit 8425ada

Please sign in to comment.