┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/kcategorizedview.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/kcategorizedview.cpp b/src/kcategorizedview.cpp
index d612f4b1c..42ee7b1ad 100644
--- a/src/kcategorizedview.cpp
+++ b/src/kcategorizedview.cpp
@@ -662,8 +662,6 @@ QModelIndex KCategorizedView::indexAt(const QPoint &point) const
index = item[0];
}
- d->hovered = index;
-
return index;
}
@@ -744,7 +742,10 @@ void KCategorizedView::paintEvent(QPaintEvent *event)
option.state |= QStyle::State_Editing;
}
- if ((index == d->hovered) && !d->mouseButtonPressed && (this->state() != QAbstractItemView::DraggingState))
+ // we are only interested to give the mouse over feedback when no
+ // dragging is happening (ereslibre)
+ if ((index == d->hovered) && !d->mouseButtonPressed &&
+ (this->state() == QAbstractItemView::NoState))
option.state |= QStyle::State_MouseOver;
else
option.state &= ~QStyle::State_MouseOver;
@@ -986,6 +987,17 @@ void KCategorizedView::mouseMoveEvent(QMouseEvent *event)
return;
}
+ QModelIndexList item = d->intersectionSet(QRect(event->pos(), event->pos()));
+
+ if (item.count() == 1)
+ {
+ d->hovered = item[0];
+ }
+ else
+ {
+ d->hovered = QModelIndex();
+ }
+
const QString previousHoveredCategory = d->hoveredCategory;
d->mousePosition = event->pos();