Skip to content
Permalink
Browse files

Merge pull request #5473 from DelazJ/saveas-symbology

Hide symbology export options when not compatible
  • Loading branch information
nyalldawson committed Dec 11, 2017
2 parents 010cb15 + 591150d commit 163a1f92c1f44853e2af0d1e36dcc2def9f5dc72
Showing with 17 additions and 0 deletions.
  1. +17 −0 src/gui/ogr/qgsvectorlayersaveasdialog.cpp
@@ -57,6 +57,7 @@ QgsVectorLayerSaveAsDialog::QgsVectorLayerSaveAsDialog( QgsVectorLayer *layer, i
mLayerExtent = layer->extent();
}
setup();

if ( !( options & Symbology ) )
{
mSymbologyExportLabel->hide();
@@ -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" ) ||

0 comments on commit 163a1f9

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