From: Frédéric Brière <fbriere@fbriere.net>
From: Modestas Vainius <modax@debian.org>
Subject: unswap Province/Country fields in kstars startup wizard
Forwarded: no
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=593159
Last-Update: 2010-09-13
The Province and Country fields are swapped in the startup wizard;
typing text in one will filter the other. This error is quite obvious
when looking at lines 171-172 of kswizard.cpp:
hasPrefix( loc->translatedCountry(), location->ProvinceFilter->text() ) &&
hasPrefix( loc->translatedProvince(), location->CountryFilter->text() )
--- a/kstars/kstars/kswizard.cpp
+++ b/kstars/kstars/kswizard.cpp
@@ -168,8 +168,8 @@ void KSWizard::slotFilterCities() {
foreach ( GeoLocation *loc, KStarsData::Instance()->getGeoList() ) {
if( hasPrefix( loc->translatedName(), location->CityFilter->text() ) &&
- hasPrefix( loc->translatedCountry(), location->ProvinceFilter->text() ) &&
- hasPrefix( loc->translatedProvince(), location->CountryFilter->text() )
+ hasPrefix( loc->translatedProvince(), location->ProvinceFilter->text() ) &&
+ hasPrefix( loc->translatedCountry(), location->CountryFilter->text() )
)
{
location->CityListBox->insertItem( loc->fullName() );