Strict name matching in core.selectObjectByName

Asked by Martin Unwin on 2017-01-21

The script file "zodiac.ssc" distributed with Stellarium includes the code:

var constellations = new Array("Gemini", "Cancer", "Leo", "Virgo", "Libra", "Scorpius", "Ophiuchus", "Sagittarius", "Capricornus", "Aquarius", "Pisces", "Aries", "Taurus");

followed later by:

for(i = 0; i < constellations.length; i++)
 core.selectObjectByName(constellations[i], false);

Running this script on my system displays 12 of the 13 constellations correctly, but Taurus is not shown while Centaurus is. This suggests that the text matching algorithm in selectObjectByName (presumably some variant of grep) is based on a partial, case-insensitive match and thus matches to Centaurus rather than Taurus.

Can you confirm whether this is the case, and - if so - suggest a fix?

Martin Unwin

Question information

English Edit question
Stellarium Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Alexander Wolf (alexwolf) said :
Revision history for this message
Martin Unwin (unwinm) said :

Yes, I can see from the transcript for bug 1655055 that searching for "Taurus" using the Search dialog runs into a similar problem. georg-zotti on 2017-01-09 (#4) offers what looks like a helpful suggestion:

        Search options: "Use autofill only from the beginnings of words". Else looking for "TAURUS" also finds "cen-TAURUS" :-)

However, this selecting this option has no effect on my system (Stellarium 0.15.1), so I'm still stuck with my original problem.

Revision history for this message
Alexander Wolf (alexwolf) said :

No, no, no - it was bug in the code, who has been fixed in revision 9111. Change option in Search Tool shouldn't help here.

I can propose updating your stable version of Stellarium to the development edition for usage solution of bug (important note: development edition should have version over or equal to

Revision history for this message
Alexander Wolf (alexwolf) said :

Please check this issue on version

Can you help with this problem?

Provide an answer of your own, or ask Martin Unwin for more information if necessary.

To post a message you must log in.