kdeedu (4:4.4.5-2) kstars_unswap_fields_in_wizard.diff

Summary

 kstars/kstars/kswizard.cpp |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

    
download this patch

Patch contents

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() );