From: Manuel Nickschas Date: Mon, 25 Jun 2007 20:31:21 +0000 (+0000) Subject: Fix off-by-one bug in a line that was even more buggy until a few hours ago. X-Git-Tag: 0.1.0~190 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=61f127be9021682a423e5acc00d1b0f88296c384;hp=6869909402a4dc807ee5261cc2a0999ac33053ee Fix off-by-one bug in a line that was even more buggy until a few hours ago. --- diff --git a/src/qtgui/chatline.cpp b/src/qtgui/chatline.cpp index fd3c7104..5d0a9730 100644 --- a/src/qtgui/chatline.cpp +++ b/src/qtgui/chatline.cpp @@ -223,7 +223,6 @@ int ChatLine::posToCursor(QPointF pos) { return line.start; } } - qWarning() << "Should we ever reach this point?"; return 0; } diff --git a/src/qtgui/chatwidget.cpp b/src/qtgui/chatwidget.cpp index ea6adf02..a437a0d3 100644 --- a/src/qtgui/chatwidget.cpp +++ b/src/qtgui/chatwidget.cpp @@ -281,7 +281,7 @@ void ChatWidget::layout() { } int ChatWidget::yToLineIdx(qreal y) { - if(y >= ycoords[ycoords.count()-1]) return ycoords.count()-1; + if(y >= ycoords[ycoords.count()-1]) return ycoords.count()-2; if(ycoords.count() <= 1) return 0; int uidx = 0; int oidx = ycoords.count() - 1;