Skip to content

Commit

Permalink
Fix initialisation of format combo box (mainly important for kml layers)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@13850 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jun 30, 2010
1 parent 3efd24b commit d4195f3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/ogr/qgsvectorlayersaveasdialog.cpp
Expand Up @@ -33,14 +33,15 @@ QgsVectorLayerSaveAsDialog::QgsVectorLayerSaveAsDialog( QWidget* parent, Qt::WFl

QSettings settings;
QMap<QString, QString> map = QgsVectorFileWriter::ogrDriverList();
mFormatComboBox->blockSignals( true );
for ( QMap< QString, QString>::const_iterator it = map.constBegin(); it != map.constEnd(); ++it )
{
mFormatComboBox->addItem( it.key(), it.value() );
}

QString format = settings.value( "/UI/lastVectorFormat", "ESRI Shapefile" ).toString();
mFormatComboBox->setCurrentIndex( mFormatComboBox->findData( format ) );

mFormatComboBox->blockSignals( false );

mEncodingComboBox->addItems( QgsVectorDataProvider::availableEncodings() );

Expand All @@ -55,6 +56,7 @@ QgsVectorLayerSaveAsDialog::QgsVectorLayerSaveAsDialog( QWidget* parent, Qt::WFl
mEncodingComboBox->setCurrentIndex( idx );

leCRS->setText( tr( "Original CRS" ) );
on_mFormatComboBox_currentIndexChanged( mFormatComboBox->currentIndex() );
}

QgsVectorLayerSaveAsDialog::~QgsVectorLayerSaveAsDialog()
Expand Down

0 comments on commit d4195f3

Please sign in to comment.