I used to find the Find Dialog in KStars rather inconvenient. I’d just hit Ctrl+F to fire it, type away “M 97″, hit enter, and it would land me at Andromeda Galaxy instead of Owl Nebula - Because that was the default selected entry in the List View and it would update the list view with the new search filter only after some delay (half a second, I think).

This commit fixes that by keeping track of whether the list has been filtered after the most recent text entry, and ensures that the list is filtered first thing after entering slotOk().

So you can simply hit Ctrl+F, type away the full name (or even a part of the name - Kentaurus landed me at Alpha Centauri :-) ) and hit enter, and it’ll slew you to the right object instead of Andromeda Galaxy. I’ve tried to ensure that it is as bug-free as possible.

If you’re running on trunk and have kdeedu compiled, please do test it.

I’ve made 5 commits in 24 hours. This certainly means I need to get a life (and some sleep)!

3 Responses to “The find dialog works to my satisfaction, at last!”

  1. Prasanna said:

    One suggestion. Wouldn’t it be nice of you could type ‘m97′ and still find it. Right now, you _have_ to type the whitespace.

  2. Akarsh Simha said:

    Correct. I’ve had trouble with that too.
    It looks a little difficult to change with the current codebase. I’ll think it over and see how I can change this. Atleast, I could provide one solution quickly - if you type “m97″ and _no other object matches_ “m97″, then we could interpret that as “m 97″ and slew you there.

    Thanks for the suggestion.

  3. Akarsh Simha said:

    Fixed: http://lists.kde.org/?l=kstars-devel&m=121254565830750&w=2

    I managed to provide the general solution itself. Now, as long as you type out M93 and “quickly” hit enter, it will slew to M 93. But if you wait for more than a second, or select one of the other items from the list, it will go to them.

Leave a Reply