Merge pull request #5071 from OPM/memory-fixes

Release of memory
This commit is contained in:
Magne Sjaastad
2019-11-21 07:10:07 +01:00
parent db869ccbd5
commit 72a5c6cfef
10 changed files with 43 additions and 18 deletions

View File

@@ -52,7 +52,7 @@ RiuQwtPlotCurve::RiuQwtPlotCurve( const QString& title )
m_symbolSkipPixelDistance = 10.0f;
m_errorBars = new QwtPlotIntervalCurve();
m_errorBars = std::unique_ptr<QwtPlotIntervalCurve>( new QwtPlotIntervalCurve() );
m_errorBars->setStyle( QwtPlotIntervalCurve::CurveStyle::NoCurve );
m_errorBars->setSymbol( new QwtIntervalSymbol( QwtIntervalSymbol::Bar ) );
m_errorBars->setItemAttribute( QwtPlotItem::Legend, false );

View File

@@ -23,6 +23,8 @@
#include "qwt_plot_intervalcurve.h"
#include "qwt_symbol.h"
#include <memory>
class RiuErrorBarsQwtPlotCurve;
//==================================================================================================
@@ -150,10 +152,10 @@ private:
std::vector<std::pair<size_t, size_t>> m_polyLineStartStopIndices;
float m_symbolSkipPixelDistance;
bool m_showErrorBars;
QwtPlotIntervalCurve* m_errorBars;
QwtPlot* m_attachedToPlot;
bool m_blackAndWhiteLegendIcon;
bool m_showErrorBars;
std::unique_ptr<QwtPlotIntervalCurve> m_errorBars;
QwtPlot* m_attachedToPlot;
bool m_blackAndWhiteLegendIcon;
std::vector<QString> m_perPointLabels;
};