Skip to content

Commit

Permalink
Fix layout labels don't immediately react to changes when
Browse files Browse the repository at this point in the history
semi-transparent
  • Loading branch information
nyalldawson committed Oct 6, 2023
1 parent 9d8a722 commit b61716f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/core/layout/qgslayoutitemlabel.cpp
Expand Up @@ -286,6 +286,7 @@ void QgsLayoutItemLabel::setFont( const QFont &f )
mFormat.setFont( f );
if ( f.pointSizeF() > 0 )
mFormat.setSize( f.pointSizeF() );
invalidateCache();
}

QgsTextFormat QgsLayoutItemLabel::textFormat() const
Expand All @@ -296,6 +297,7 @@ QgsTextFormat QgsLayoutItemLabel::textFormat() const
void QgsLayoutItemLabel::setTextFormat( const QgsTextFormat &format )
{
mFormat = format;
invalidateCache();
}

void QgsLayoutItemLabel::setMargin( const double m )
Expand Down
4 changes: 2 additions & 2 deletions src/core/layout/qgslayoutitemlabel.h
Expand Up @@ -140,14 +140,14 @@ class CORE_EXPORT QgsLayoutItemLabel: public QgsLayoutItem
* \see hAlign()
* \see setVAlign()
*/
void setHAlign( Qt::AlignmentFlag alignment ) { mHAlignment = alignment; }
void setHAlign( Qt::AlignmentFlag alignment ) { mHAlignment = alignment; invalidateCache(); }

/**
* Sets for the vertical \a alignment of the label.
* \see vAlign()
* \see setHAlign()
*/
void setVAlign( Qt::AlignmentFlag alignment ) { mVAlignment = alignment; }
void setVAlign( Qt::AlignmentFlag alignment ) { mVAlignment = alignment; invalidateCache(); }

/**
* Returns the horizontal margin between the edge of the frame and the label
Expand Down

0 comments on commit b61716f

Please sign in to comment.