diff options
author | Liang Qi <liang.qi@qt.io> | 2018-12-11 15:08:00 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-12-11 15:08:00 +0100 |
commit | c9ce0deeb8f2bb79c446e41584f753f1b1bfe17f (patch) | |
tree | 5e9a06346ea22e6e9a2fafd6a2ac7394c73648c6 /src/render/jobs | |
parent | f1b333c36a19cf85eab798fc1b1952ed063fedfe (diff) | |
parent | 0a0a7e4ca4f05c7d6da55ec64c8a9734d82853fe (diff) |
Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
src/render/renderers/opengl/textures/gltexture.cpp
Change-Id: I57e9a296dc15f0b5dc3af3664f698bdc799c4bb5
Diffstat (limited to 'src/render/jobs')
-rw-r--r-- | src/render/jobs/pickboundingvolumejob.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/render/jobs/pickboundingvolumejob.cpp b/src/render/jobs/pickboundingvolumejob.cpp index 2f1eb4cd8..2050b8772 100644 --- a/src/render/jobs/pickboundingvolumejob.cpp +++ b/src/render/jobs/pickboundingvolumejob.cpp @@ -232,8 +232,14 @@ bool PickBoundingVolumeJob::runHelper() for (const PickingUtils::ViewportCameraAreaDetails &vca : vcaDetails) { PickingUtils::HitList sphereHits; QRay3D ray = rayForViewportAndCamera(vca, event.first, event.second.pos()); - if (!ray.isValid()) + if (!ray.isValid()) { + // An invalid rays is when we've lost our surface or the mouse + // has moved out of the viewport In case of a button released + // outside of the viewport, we still want to notify the + // lastCurrent entity about this. + dispatchPickEvents(event.second, PickingUtils::HitList(), eventButton, eventButtons, eventModifiers, allHitsRequested); continue; + } PickingUtils::HierarchicalEntityPicker entityPicker(ray); if (entityPicker.collectHits(m_manager, m_node)) { |