Skip to content

Commit

Permalink
QgsGlowEffect: add missing members in operator=() and make copy const…
Browse files Browse the repository at this point in the history
…ructor use it
  • Loading branch information
rouault authored and nyalldawson committed Jan 30, 2020
1 parent 2f956b8 commit 6e67d2c
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions src/core/effects/qgsgloweffect.cpp
Expand Up @@ -29,21 +29,8 @@ QgsGlowEffect::QgsGlowEffect()

QgsGlowEffect::QgsGlowEffect( const QgsGlowEffect &other )
: QgsPaintEffect( other )
, mSpread( other.spread() )
, mSpreadUnit( other.spreadUnit() )
, mSpreadMapUnitScale( other.spreadMapUnitScale() )
, mBlurLevel( other.blurLevel() )
, mBlurUnit( other.mBlurUnit )
, mBlurMapUnitScale( other.mBlurMapUnitScale )
, mOpacity( other.opacity() )
, mColor( other.color() )
, mBlendMode( other.blendMode() )
, mColorType( other.colorType() )
{
if ( other.ramp() )
{
mRamp = other.ramp()->clone();
}
operator=( other );
}

QgsGlowEffect::~QgsGlowEffect()
Expand Down Expand Up @@ -216,8 +203,12 @@ QgsGlowEffect &QgsGlowEffect::operator=( const QgsGlowEffect &rhs )
delete mRamp;

mSpread = rhs.spread();
mSpreadUnit = rhs.spreadUnit();
mSpreadMapUnitScale = rhs.spreadMapUnitScale();
mRamp = rhs.ramp() ? rhs.ramp()->clone() : nullptr;
mBlurLevel = rhs.blurLevel();
mBlurUnit = rhs.mBlurUnit;
mBlurMapUnitScale = rhs.mBlurMapUnitScale;
mOpacity = rhs.opacity();
mColor = rhs.color();
mBlendMode = rhs.blendMode();
Expand Down

0 comments on commit 6e67d2c

Please sign in to comment.