diff options
author | José Fonseca <jose.r.fonseca@gmail.com> | 2012-12-09 12:38:48 +0000 |
---|---|---|
committer | José Fonseca <jose.r.fonseca@gmail.com> | 2012-12-09 12:38:48 +0000 |
commit | 857c292110606679d2ba7de05d2782b5a36a5542 (patch) | |
tree | 41b6141acbd0715d6fd255521b47f102218d0565 /gui/graphing | |
parent | bb95803da37219b553f23cad88c81f84c30122a4 (diff) |
qapitrace: Fix histogram tooltip for profiles with small number of calls.
Diffstat (limited to 'gui/graphing')
-rw-r--r-- | gui/graphing/histogramview.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gui/graphing/histogramview.cpp b/gui/graphing/histogramview.cpp index 0b945772..2dd3d8e9 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; |