Skip to content

Commit

Permalink
Merge pull request #5473 from DelazJ/saveas-symbology
Browse files Browse the repository at this point in the history
Hide symbology export options when not compatible
  • Loading branch information
nyalldawson committed Dec 11, 2017
2 parents 010cb15 + 591150d commit 163a1f9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/gui/ogr/qgsvectorlayersaveasdialog.cpp
Expand Up @@ -57,6 +57,7 @@ QgsVectorLayerSaveAsDialog::QgsVectorLayerSaveAsDialog( QgsVectorLayer *layer, i
mLayerExtent = layer->extent();
}
setup();

if ( !( options & Symbology ) )
{
mSymbologyExportLabel->hide();
Expand Down Expand Up @@ -386,6 +387,22 @@ void QgsVectorLayerSaveAsDialog::mFormatComboBox_currentIndexChanged( int idx )
fieldsAsDisplayedValues = ( sFormat == QLatin1String( "CSV" ) || sFormat == QLatin1String( "XLS" ) || sFormat == QLatin1String( "XLSX" ) || sFormat == QLatin1String( "ODS" ) );
}

// Show symbology options only for some formats
if ( sFormat == QLatin1String( "DXF" ) || sFormat == QLatin1String( "KML" ) || sFormat == QLatin1String( "MapInfo File" ) || sFormat == QLatin1String( "MapInfo MIF" ) )
{
mSymbologyExportLabel->setVisible( true );
mSymbologyExportComboBox->setVisible( true );
mScaleLabel->setVisible( true );
mScaleWidget->setVisible( true );
}
else
{
mSymbologyExportLabel->hide();
mSymbologyExportComboBox->hide();
mScaleLabel->hide();
mScaleWidget->hide();
}

leLayername->setEnabled( sFormat == QLatin1String( "KML" ) ||
sFormat == QLatin1String( "GPKG" ) ||
sFormat == QLatin1String( "XLSX" ) ||
Expand Down

0 comments on commit 163a1f9

Please sign in to comment.