Added missing initialization of distance when picking in Qwt plots

This commit is contained in:
Magne Sjaastad 2016-06-29 13:39:26 +02:00
parent bb18c28cf3
commit ea6d652a17
2 changed files with 2 additions and 2 deletions

View File

@ -214,7 +214,7 @@ void RiuSummaryQwtPlot::selectClosestCurve(const QPoint& pos)
if((*it)->rtti() == QwtPlotItem::Rtti_PlotCurve)
{
QwtPlotCurve* candidateCurve = static_cast<QwtPlotCurve*>(*it);
double dist;
double dist = DBL_MAX;
candidateCurve->closestPoint(pos, &dist);
if(dist < distMin)
{

View File

@ -240,7 +240,7 @@ void RiuWellLogTrack::selectClosestCurve(const QPoint& pos)
if ((*it )->rtti() == QwtPlotItem::Rtti_PlotCurve )
{
QwtPlotCurve* candidateCurve = static_cast<QwtPlotCurve*>(*it);
double dist;
double dist = DBL_MAX;
candidateCurve->closestPoint(pos, &dist);
if (dist < distMin)
{