Skip to content
Permalink
Browse files

Show symbology export options only when compatible (fixes #11098)

  • Loading branch information
DelazJ committed Oct 25, 2017
1 parent 99b1c74 commit 591150d7ccb51938c37413470d197ec204ce0035
Showing with 19 additions and 2 deletions.
  1. +19 −2 src/gui/ogr/qgsvectorlayersaveasdialog.cpp
@@ -57,6 +57,7 @@ QgsVectorLayerSaveAsDialog::QgsVectorLayerSaveAsDialog( QgsVectorLayer *layer, i
mLayerExtent = layer->extent();
}
setup();

if ( !( options & Symbology ) )
{
mSymbologyExportLabel->hide();
@@ -360,15 +361,31 @@ void QgsVectorLayerSaveAsDialog::mFormatComboBox_currentIndexChanged( int idx )
const QString sFormat( format() );
if ( sFormat == QLatin1String( "DXF" ) || sFormat == QLatin1String( "DGN" ) )
{
mAttributesSelection->setEnabled( false );
mAttributesSelection->setVisible( false );
selectAllFields = false;
}
else
{
mAttributesSelection->setEnabled( true );
mAttributesSelection->setVisible( true );
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 591150d

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