diff --git a/interface/src/ui/overlays/Overlays.cpp b/interface/src/ui/overlays/Overlays.cpp index 83cbf38013..8e86ce29d0 100644 --- a/interface/src/ui/overlays/Overlays.cpp +++ b/interface/src/ui/overlays/Overlays.cpp @@ -557,8 +557,8 @@ RayToOverlayIntersectionResult Overlays::findRayIntersectionVector(const PickRay thisFace, thisSurfaceNormal, thisExtraInfo, precisionPicking)) { bool isDrawInFront = thisOverlay->getDrawInFront(); bool isTablet = tabletIDs.contains(thisID); - if (isDrawInFront && !bestIsFront && !bestIsTablet - || (isTablet || isDrawInFront || !bestIsFront) && thisDistance < bestDistance) { + if ((isDrawInFront && !bestIsFront && !bestIsTablet) + || ((isTablet || isDrawInFront || !bestIsFront) && thisDistance < bestDistance)) { bestIsFront = isDrawInFront; bestIsTablet = isTablet; bestDistance = thisDistance;