Commit d8089973 authored by Nicolás Alvarez's avatar Nicolás Alvarez
Browse files

MouseEventListener: Don't process event from children multiple times.

If an event passed through multiple visually-overlapping children of
MouseEventListener, the event filter was processing the event every time.
For example, this caused problems for the KMix icon in the tray, which
would trigger volume changes three times for every mouse wheel event.

parent 2cafde42
......@@ -164,6 +164,11 @@ bool MouseEventListener::sceneEventFilter(QGraphicsItem *item, QEvent *event)
return false;
// If we already processed this event for another child, don't do it again.
if (m_lastEvent == event) {
return false;
switch (event->type()) {
case QEvent::GraphicsSceneMousePress: {
m_lastEvent = event;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment