diff options
author | Antti Määttä <antti.maatta@qt.io> | 2019-10-09 08:57:54 +0300 |
---|---|---|
committer | Antti Määttä <antti.maatta@qt.io> | 2019-10-09 11:00:45 +0300 |
commit | 2e74095b645d3ecbbb8850e24dc823ed4378f650 (patch) | |
tree | 351c13e643e5580e2ca152dac990f7cb3672ee88 | |
parent | 744d5bbdb462bb731bc6422c12645e24a57e6bd2 (diff) |
Prevent picking from losing events
Use append instead of assingment in PickBoundingVolumeJobs setxxxEvents.
The setters gets called more times than the job gets to run so appending
will not overwrite the events we have not processed yet.
Task-number: QTBUG-69397
Change-Id: I4823ac5f622f636ee18af64d729ef196f76bc886
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
-rw-r--r-- | src/render/jobs/pickboundingvolumejob.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/render/jobs/pickboundingvolumejob.cpp b/src/render/jobs/pickboundingvolumejob.cpp index 96ec11b4e..1a6cd7ba4 100644 --- a/src/render/jobs/pickboundingvolumejob.cpp +++ b/src/render/jobs/pickboundingvolumejob.cpp @@ -122,12 +122,12 @@ void PickBoundingVolumeJob::setRoot(Entity *root) void PickBoundingVolumeJob::setMouseEvents(const QList<QPair<QObject*, QMouseEvent>> &pendingEvents) { - m_pendingMouseEvents = pendingEvents; + m_pendingMouseEvents.append(pendingEvents); } void PickBoundingVolumeJob::setKeyEvents(const QList<QKeyEvent> &pendingEvents) { - m_pendingKeyEvents = pendingEvents; + m_pendingKeyEvents.append(pendingEvents); } void PickBoundingVolumeJob::markPickersDirty() |