Skip to content
Permalink
Browse files

Fix regression in vector "save as" that saved shapefiles as .dbf only (

…fixes #14158)
  • Loading branch information
wonder-sk committed Jan 23, 2016
1 parent 8346601 commit 5512d5443f40e4aa6c70ab63149c0dd03a77b308
Showing with 8 additions and 4 deletions.
  1. +6 −3 src/app/ogr/qgsvectorlayersaveasdialog.cpp
  2. +2 −1 src/core/qgsvectorfilewriter.cpp
@@ -395,21 +395,24 @@ QStringList QgsVectorLayerSaveAsDialog::layerOptions() const
case QgsVectorFileWriter::Int:
{
QSpinBox* sb = mLayerOptionsGroupBox->findChild<QSpinBox*>( it.key() );
options << QString( "%1=%2" ).arg( it.key() ).arg( sb->value() );
if ( sb )
options << QString( "%1=%2" ).arg( it.key() ).arg( sb->value() );
break;
}

case QgsVectorFileWriter::Set:
{
QComboBox* cb = mLayerOptionsGroupBox->findChild<QComboBox*>( it.key() );
options << QString( "%1=%2" ).arg( it.key(), cb->currentText() );
if ( cb && !cb->itemData( cb->currentIndex() ).isNull() )
options << QString( "%1=%2" ).arg( it.key(), cb->currentText() );
break;
}

case QgsVectorFileWriter::String:
{
QLineEdit* le = mLayerOptionsGroupBox->findChild<QLineEdit*>( it.key() );
options << QString( "%1=%2" ).arg( it.key(), le->text() );
if ( le )
options << QString( "%1=%2" ).arg( it.key(), le->text() );
break;
}

@@ -683,7 +683,8 @@ QMap<QString, QgsVectorFileWriter::MetaData> QgsVectorFileWriter::initMetaData()
<< "ARCZ"
<< "POLYGONZ"
<< "MULTIPOINTZ",
"NULL" // Default value
QString(), // Default value
true // Allow None
) );

layerOptions.insert( "ENCODING", new SetOption(

1 comment on commit 5512d54

@nirvn

This comment has been minimized.

Copy link
Contributor

@nirvn nirvn commented on 5512d54 Jan 23, 2016

@wonder-wk , wonderful!

Please sign in to comment.
You can’t perform that action at this time.