From 0c8db18a84d1c98a66016ef373247094094a94cc Mon Sep 17 00:00:00 2001 From: Henry Leung Date: Sat, 23 Nov 2024 16:13:55 -0500 Subject: [PATCH] keep FOV search radius in hiDPI screen consistent from user perspective --- src/core/StelObjectMgr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/StelObjectMgr.cpp b/src/core/StelObjectMgr.cpp index 2a86ec3aebcf4..e60d8b4ad4d63 100644 --- a/src/core/StelObjectMgr.cpp +++ b/src/core/StelObjectMgr.cpp @@ -461,8 +461,8 @@ StelObjectP StelObjectMgr::cleverFind(const StelCore* core, const Vec3d& v) cons { const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000); - // Field of view for a searchRadiusPixel pixel diameter circle on screen - const double fov_around = core->getMovementMgr()->getCurrentFov()/qMin(prj->getViewportWidth(), prj->getViewportHeight()) * searchRadiusPixel; + // Field of view for a searchRadiusPixel pixel diameter circle on User's screen (which may not be the same on scaled display) + const double fov_around = core->getMovementMgr()->getCurrentFov()/qMin(prj->getViewportWidth(), prj->getViewportHeight()) * searchRadiusPixel * core->getCurrentStelProjectorParams().devicePixelsPerPixel; // Collect the objects inside the range // TODO: normalize v here, and just Q_ASSERT normalized state in the submodules' searchAround() calls.