[prev in list] [next in list] [prev in thread] [next in thread]
List: kstars-devel
Subject: [Kstars-devel] KDE/kdeedu/kstars/kstars
From: Médéric Boquien <mboquien () free ! fr>
Date: 2010-06-05 22:29:43
Message-ID: 20100605222943.4FCCAAC8CC () svn ! kde ! org
[Download RAW message or body]
SVN commit 1134966 by mboquien:
Ever wondered why kstars default location was Greenville, SC instead of Greenwich \
England? Apparently the list sorting messed up the index. Now we just search for the \
right item in the list based on its name.
CCMAIL: kstars-devel@kde.org
M +1 -3 kswizard.cpp
--- trunk/KDE/kdeedu/kstars/kstars/kswizard.cpp #1134965:1134966
@@ -120,12 +120,10 @@
//Populate the CityListBox
//flag the ID of the current City
- int index = 0;
foreach ( GeoLocation *loc, data->getGeoList() ) {
location->CityListBox->insertItem( loc->fullName() );
filteredCityList.append( loc );
if ( loc->fullName() == data->geo()->fullName() ) {
- index = data->getGeoList().indexOf( loc );
Geo = loc;
}
}
@@ -133,7 +131,7 @@
//Sort alphabetically
location->CityListBox->sort();
//preset to current city
- location->CityListBox->setCurrentItem( index );
+ location->CityListBox->setCurrentItem( \
location->CityListBox->findItem(QString(data->geo()->fullName()) ) ); }
void KSWizard::slotChangeCity() {
_______________________________________________
Kstars-devel mailing list
Kstars-devel@kde.org
https://mail.kde.org/mailman/listinfo/kstars-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic