Fixed the mouse cursor no longer turning into a hand above the mark area

Reviewed-by: mae
Reviewed-by: con
This commit is contained in:
Thorbjørn Lindeijer
2009-06-16 12:15:33 +02:00
parent 86284e43a6
commit b76ebd66e0

View File

@@ -2770,6 +2770,13 @@ void BaseTextEditor::extraAreaMouseEvent(QMouseEvent *e)
}
}
// Set whether the mouse cursor is a hand or normal arrow
if (e->type() == QEvent::MouseMove) {
bool hand = (e->pos().x() <= markWidth);
if (hand != (d->m_extraArea->cursor().shape() == Qt::PointingHandCursor))
d->m_extraArea->setCursor(hand ? Qt::PointingHandCursor : Qt::ArrowCursor);
}
if (e->type() == QEvent::MouseButtonPress || e->type() == QEvent::MouseButtonDblClick) {
if (e->button() == Qt::LeftButton) {
int boxWidth = collapseBoxWidth(fontMetrics());