Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion profileplot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,17 @@ qDebug() << "Populate";
left = transform.map(left);
left.append(right);

QwtPlotCurve *cprofileavg = new QwtPlotCurve( name + " avg");
ProfileCurve *cprofileavg = new ProfileCurve( name + " avg");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see a memory leak here.
A new with no delete and no Qt object with parent.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting point. I'll look at this today.

if (left.size() >= 2) {
// Distance between two samples
double xDel = fabs(left[0].x() - left[1].x());

// Recalculate hDelLimit using this specific xDel
double hDelLimit = m_showNm * m_showSurface * ((outputLambda/m_wf->lambda) * fabs(xDel * tan(arcsecLimit)) / (outputLambda * 1.e-6));

cprofileavg->setSlopeSettings(m_showSlopeError, hDelLimit, Settings2::m_profile->slopeErrorWidth());
}

cprofileavg->setRenderHint( QwtPlotItem::RenderAntialiased );
cprofileavg->setLegendAttribute( QwtPlotCurve::LegendShowSymbol, false );
cprofileavg->setLegendIconSize(QSize(50,20));
Expand Down
Loading