summaryrefslogtreecommitdiffstats
path: root/src/graphui/classes/com/jogamp/graph/ui
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-04-10 06:09:00 +0200
committerSven Gothel <[email protected]>2023-04-10 06:09:00 +0200
commitb421ffb2eceba36037add192e786ef75a152aa99 (patch)
tree773011ce2a590a63b84bbd64ae91a801b47f6d95 /src/graphui/classes/com/jogamp/graph/ui
parent5406ac7c12e3aa4be6475f4fb12eca03a188c2f4 (diff)
GraphUI Scene.pickShape(): Consider isInteractive() most early in visitor() before gluUnProjectRay(..)
Diffstat (limited to 'src/graphui/classes/com/jogamp/graph/ui')
-rw-r--r--src/graphui/classes/com/jogamp/graph/ui/Scene.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/Scene.java b/src/graphui/classes/com/jogamp/graph/ui/Scene.java
index d4c981e62..7d4e10574 100644
--- a/src/graphui/classes/com/jogamp/graph/ui/Scene.java
+++ b/src/graphui/classes/com/jogamp/graph/ui/Scene.java
@@ -490,7 +490,7 @@ public final class Scene implements Container, GLEventListener {
shape[0] = null;
forSortedAll(Shape.ZAscendingComparator, pmv, (final Shape s, final PMVMatrix pmv2) -> {
- final boolean ok = pmv.gluUnProjectRay(glWinX, glWinY, winZ0, winZ1, viewport, ray);
+ final boolean ok = s.isInteractive() && pmv.gluUnProjectRay(glWinX, glWinY, winZ0, winZ1, viewport, ray);
if( ok ) {
final AABBox sbox = s.getBounds();
if( sbox.intersectsRay(ray) ) {
@@ -899,9 +899,7 @@ public final class Scene implements Container, GLEventListener {
final Shape[] shape = { null };
if( null == pickShape(pmv, glWinX, glWinY, objPos, shape, () -> {
setActiveShape(shape[0]);
- if( shape[0].isInteractive() ) {
- shape[0].dispatchMouseEvent(e, glWinX, glWinY, objPos);
- }
+ shape[0].dispatchMouseEvent(e, glWinX, glWinY, objPos);
} ) )
{
releaseActiveShape();