|
@@ -7706,7 +7706,8 @@ GraphView::GraphView(QWidget *parent) : QGraphicsView(parent),
|
7706
|
7706
|
gridLinesF(new QList<QGraphicsItem *>),
|
7707
|
7707
|
gridLinesC(new QList<QGraphicsItem *>),
|
7708
|
7708
|
relativeGridLines(new QList<QGraphicsItem *>),
|
7709
|
|
- relativeEnabled(false)@/
|
|
7709
|
+ relativeEnabled(false),
|
|
7710
|
+ relativeAdjuster(new LinearSplineInterpolator)@/
|
7710
|
7711
|
{
|
7711
|
7712
|
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
7712
|
7713
|
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
|
@@ -7802,11 +7803,11 @@ if(settings.contains("settings/graph/relative/enable"))
|
7802
|
7803
|
relativeGridLines->append(label);
|
7803
|
7804
|
if(unit == "F")
|
7804
|
7805
|
{
|
7805
|
|
- relativeAdjuster->add_pair(key, y);
|
|
7806
|
+ relativeAdjuster->add_pair(key, -y);
|
7806
|
7807
|
}
|
7807
|
7808
|
else
|
7808
|
7809
|
{
|
7809
|
|
- relativeAdjuster->add_pair(key * (9.0/5.0), y);
|
|
7810
|
+ relativeAdjuster->add_pair(key * (9.0/5.0), -y);
|
7810
|
7811
|
}
|
7811
|
7812
|
y -= skip;
|
7812
|
7813
|
}
|
|
@@ -7889,7 +7890,14 @@ void GraphView::newMeasurement(Measurement measure, int tempcolumn)@/
|
7889
|
7890
|
{
|
7890
|
7891
|
if(measure.value("relative").toBool())
|
7891
|
7892
|
{
|
7892
|
|
- measure.setTemperature(relativeAdjuster->newMeasurement(measure).temperature());
|
|
7893
|
+ if(relativeEnabled)
|
|
7894
|
+ {
|
|
7895
|
+ measure.setTemperature(relativeAdjuster->newMeasurement(measure).temperature());
|
|
7896
|
+ }
|
|
7897
|
+ else
|
|
7898
|
+ {
|
|
7899
|
+ return;
|
|
7900
|
+ }
|
7893
|
7901
|
}
|
7894
|
7902
|
}
|
7895
|
7903
|
if(translations->contains(tempcolumn))
|