[Kstars-devel] Half a bug fix for Asteroid display bug.

Akarsh Simha akarshsimha at gmail.com
Wed May 30 23:51:22 CEST 2007


Hi all.

This is a problem with asteroid limiting magnitude.
We displayed all asteroids which are brighter than the magnitude limit
set in the options tool. But we had not restricted the user from
searching such Asteroids, and you could still right click and find it
though it is not at all drawn.

The workaround for the latter bug was easy and as Jason suggested, I
overrided ListComponent::objectNearest by a
AsteroidsComponent::objectNearest that took the magnitude filter into
consideration.

The former bug, i.e. exclusion of these asteroids from the Find Tool
is something I don't know how to do.

I have these possible alternatives:

1. We include a method bool SkyComponent::Findable or something which
returns true by default and override it for various child classes as
we wish, so that we may include or exclude a certain item from the
list.

2. We include messy if( this object is an asteroid ) then check for
limiting magnitude types of statements in the Find Tool.

In either case, we will have to forfeit the simple and fast use of the
+= operator to concatenate the lists, thus making the population of
the list even slower.

Any suggestions or ideas?

The patch for the prevention of right click on an asteroid is attached.

Thanks.

-- 
Regards,
     Akarsh
http://www.bas.org.in
http://www.nascent-technologies.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asteroidfix.patch
Type: text/x-patch
Size: 2377 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kstars-devel/attachments/20070531/2299c83a/attachment.bin 


More information about the Kstars-devel mailing list