summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <[email protected]>2016-03-30 20:13:25 +0300
committerJasem Mutlaq <[email protected]>2016-03-30 20:13:25 +0300
commitb9d3d9ea2ca8c2da95e8319a34832e8e85c6df9b (patch)
treef94db266257b0b7567132e685ff8428f001e94f5
parentedb0e03684509defa41265354b4724d0cd8f37bb (diff)
Prefer named stars over unnamed ones when finding objects nearest to a point
-rw-r--r--kstars/skycomponents/starcomponent.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/kstars/skycomponents/starcomponent.cpp b/kstars/skycomponents/starcomponent.cpp
index cbb4690..975b4a1 100644
--- a/kstars/skycomponents/starcomponent.cpp
+++ b/kstars/skycomponents/starcomponent.cpp
@@ -606,11 +606,11 @@ SkyObject* StarComponent::objectNearest( SkyPoint *p, double &maxrad )
// Check up with our Deep Star Components too!
double rTry, rBest;
SkyObject *oTry;
- rBest = maxrad;
+ // JM 2016-03-30: Multiply rBest by a factor of 0.5 so that named stars are preferred to unnamed stars searched below
+ rBest = maxrad * 0.5;
rTry = maxrad;
for( int i = 0; i < m_DeepStarComponents.size(); ++i ) {
oTry = m_DeepStarComponents.at( i )->objectNearest( p, rTry );
- // TODO: Should we multiply rBest by a factor < 1, so that we give higher priority to named stars?
if( rTry < rBest ) {
rBest = rTry;
oBest = oTry;