From 857c292110606679d2ba7de05d2782b5a36a5542 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Sun, 9 Dec 2012 12:38:48 +0000 Subject: [PATCH] qapitrace: Fix histogram tooltip for profiles with small number of calls. --- gui/graphing/histogramview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/graphing/histogramview.cpp b/gui/graphing/histogramview.cpp index 0b94577..2dd3d8e 100644 --- a/gui/graphing/histogramview.cpp +++ b/gui/graphing/histogramview.cpp @@ -228,8 +228,8 @@ void HistogramView::paintEvent(QPaintEvent *) qint64 HistogramView::itemAtPosition(QPoint pos) { double dvdx = m_viewWidth / (double)width(); - qint64 left = qFloor(dvdx) * (pos.x() - 1) + m_viewLeft; - qint64 right = qCeil(dvdx) * (pos.x() + 1) + m_viewLeft; + qint64 left = qFloor(dvdx * (pos.x() - 1)) + m_viewLeft; + qint64 right = qCeil(dvdx * (pos.x() + 1)) + m_viewLeft; qint64 longestIndex = 0; qint64 longestValue = 0; -- 2.43.0