mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 10:32:13 +08:00
50 lines
1.6 KiB
Diff
50 lines
1.6 KiB
Diff
commit be1a5d484c70f4f6a383150810afbfbb367db2ac
|
|
Author: Eike Hein <hein@kde.org>
|
|
Date: Tue Sep 3 20:29:23 2013 +0200
|
|
|
|
Discard the recorded events in the item-local handlers.
|
|
|
|
Solves problems with identical events being ignored due to
|
|
QGraphicsView's reuse of QGraphicsSceneMouseEvent instances.
|
|
|
|
CCMAIL:rdieter@fedoraproject.org
|
|
BUG:324470
|
|
BUG:324471
|
|
|
|
diff --git a/plasma/declarativeimports/qtextracomponents/mouseeventlistener.cpp b/plasma/declarativeimports/qtextracomponents/mouseeventlistener.cpp
|
|
index b534845..36530e0 100644
|
|
--- a/plasma/declarativeimports/qtextracomponents/mouseeventlistener.cpp
|
|
+++ b/plasma/declarativeimports/qtextracomponents/mouseeventlistener.cpp
|
|
@@ -90,6 +90,7 @@ bool MouseEventListener::containsMouse() const
|
|
void MouseEventListener::mousePressEvent(QGraphicsSceneMouseEvent *me)
|
|
{
|
|
if (m_lastEvent == me) {
|
|
+ m_lastEvent = 0;
|
|
return;
|
|
}
|
|
|
|
@@ -112,6 +113,7 @@ void MouseEventListener::mousePressEvent(QGraphicsSceneMouseEvent *me)
|
|
void MouseEventListener::mouseMoveEvent(QGraphicsSceneMouseEvent *me)
|
|
{
|
|
if (m_lastEvent == me) {
|
|
+ m_lastEvent = 0;
|
|
return;
|
|
}
|
|
|
|
@@ -122,6 +124,7 @@ void MouseEventListener::mouseMoveEvent(QGraphicsSceneMouseEvent *me)
|
|
void MouseEventListener::mouseReleaseEvent(QGraphicsSceneMouseEvent *me)
|
|
{
|
|
if (m_lastEvent == me) {
|
|
+ m_lastEvent = 0;
|
|
return;
|
|
}
|
|
|
|
@@ -138,6 +141,7 @@ void MouseEventListener::mouseReleaseEvent(QGraphicsSceneMouseEvent *me)
|
|
void MouseEventListener::wheelEvent(QGraphicsSceneWheelEvent *we)
|
|
{
|
|
if (m_lastEvent == we) {
|
|
+ m_lastEvent = 0;
|
|
return;
|
|
}
|
|
|