[Marble-commits] KDE/kdeedu/marble/src/lib
Bernhard Beschow
bbeschow at cs.tu-berlin.de
Sun Feb 20 16:55:04 CET 2011
SVN commit 1221816 by beschow:
MapWizard: move most recently used URL on top of static server history (and make sure it is there only once)
M +6 -3 MapWizard.cpp
--- trunk/KDE/kdeedu/marble/src/lib/MapWizard.cpp #1221815:1221816
@@ -106,6 +106,9 @@
m_serverCapabilitiesValid = false;
} else if ( id == 2 || id == 4 ) {
levelZero.clear();
+ uiWidget.comboBoxStaticUrlServer->clear();
+ uiWidget.comboBoxStaticUrlServer->addItems( staticUrlServerList );
+ uiWidget.comboBoxStaticUrlServer->addItem( "http://" );
} else if ( id == 5 ) {
if ( mapProviderType == MapWizardPrivate::StaticImageMap ) {
previewImage = QImage( uiWidget.lineEditSource->text() ).scaled( 136, 136, Qt::IgnoreAspectRatio, Qt::SmoothTransformation );
@@ -257,8 +260,6 @@
void MapWizard::setStaticUrlServers( const QStringList& uris )
{
d->staticUrlServerList = uris;
- d->uiWidget.comboBoxStaticUrlServer->addItems( d->staticUrlServerList );
- d->uiWidget.comboBoxStaticUrlServer->addItem( "http://" );
}
void MapWizard::autoFillDetails()
@@ -439,7 +440,9 @@
}
if ( d->mapProviderType == MapWizardPrivate::StaticUrlMap ) {
- d->staticUrlServerList.append( d->uiWidget.comboBoxStaticUrlServer->currentText() );
+ const QString url = d->uiWidget.comboBoxStaticUrlServer->currentText();
+ d->staticUrlServerList.removeAll( url );
+ d->staticUrlServerList.prepend( url );
}
next();
More information about the Marble-commits
mailing list