Skip to content

Commit

Permalink
QRadialGradient: Don't initialize focal radius twice
Browse files Browse the repository at this point in the history
Change-Id: I532c1097604a3c59747d05c88a64d7ed97f9addd
Reviewed-by: Lars Knoll <[email protected]>
  • Loading branch information
rlohning committed Dec 17, 2024
1 parent 8553ffd commit a56a6ba
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/gui/painting/qbrush.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2141,11 +2141,10 @@ QRadialGradient::QRadialGradient(const QPointF &center, qreal centerRadius, cons
m_data.radial.cx = center.x();
m_data.radial.cy = center.y();
m_data.radial.cradius = centerRadius;
m_data.radial.fradius = 0;
m_data.radial.fradius = focalRadius;

m_data.radial.fx = focalPoint.x();
m_data.radial.fy = focalPoint.y();
setFocalRadius(focalRadius);
}

/*!
Expand All @@ -2162,11 +2161,10 @@ QRadialGradient::QRadialGradient(qreal cx, qreal cy, qreal centerRadius, qreal f
m_data.radial.cx = cx;
m_data.radial.cy = cy;
m_data.radial.cradius = centerRadius;
m_data.radial.fradius = 0;
m_data.radial.fradius = focalRadius;

m_data.radial.fx = fx;
m_data.radial.fy = fy;
setFocalRadius(focalRadius);
}

/*!
Expand Down

0 comments on commit a56a6ba

Please sign in to comment.