Fix log axis crash in Grid Cross Plot and refactor log axis range code

This commit is contained in:
Gaute Lindkvist
2019-03-13 10:16:46 +01:00
parent 0ce69d41dd
commit 52d2eed98b
10 changed files with 186 additions and 70 deletions

View File

@@ -120,20 +120,18 @@ class QwtPlotCurve;
///
///
//==================================================================================================
class RimPlotAxisRangeCalculator
class RimPlotAxisLogRangeCalculator
{
public:
RimPlotAxisRangeCalculator(QwtPlot::Axis axis,
const std::vector<QwtPlotCurve*>& qwtCurves,
const std::vector<double>& axisValuesForAllCurves);
RimPlotAxisLogRangeCalculator(QwtPlot::Axis axis,
const std::vector<const QwtPlotCurve*>& qwtCurves);
void computeAxisRange(double* min, double* max) const;
void computeAxisRange(double* minPositive, double* max) const;
private:
bool curveValueRange(const QwtPlotCurve* qwtCurve, double* min, double* max) const;
bool curveValueRange(const QwtPlotCurve* qwtCurve, double* minPositive, double* max) const;
private:
QwtPlot::Axis m_axis;
const std::vector<QwtPlotCurve*> m_singleCurves;
const std::vector<double> m_axisValuesForAllCurves;
QwtPlot::Axis m_axis;
const std::vector<const QwtPlotCurve*> m_curves;
};