Skip to content

Commit

Permalink
Don't allow selection of adding z/multigeometries when saving a vector
Browse files Browse the repository at this point in the history
layer with geometry type set to No Geometry
  • Loading branch information
nyalldawson committed Jun 8, 2017
1 parent dbdbd15 commit 0591225
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/app/ogr/qgsvectorlayersaveasdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -897,8 +897,18 @@ void QgsVectorLayerSaveAsDialog::on_mGeometryTypeComboBox_currentIndexChanged( i
{
int currentIndexData = mGeometryTypeComboBox->itemData( index ).toInt();

mForceMultiCheckBox->setEnabled( currentIndexData != -1 );
mIncludeZCheckBox->setEnabled( currentIndexData != -1 );
if ( currentIndexData != -1 && currentIndexData != QgsWkbTypes::NoGeometry )
{
mForceMultiCheckBox->setEnabled( true );
mIncludeZCheckBox->setEnabled( true );
}
else
{
mForceMultiCheckBox->setEnabled( false );
mForceMultiCheckBox->setChecked( false );
mIncludeZCheckBox->setEnabled( false );
mIncludeZCheckBox->setChecked( false );
}
}

void QgsVectorLayerSaveAsDialog::on_mSelectAllAttributes_clicked()
Expand Down

0 comments on commit 0591225

Please sign in to comment.