Skip to content

Commit

Permalink
Disable VRT checkbox for Geopackages in the 'Save Raster Layer As' di…
Browse files Browse the repository at this point in the history
…alog. It doesn't make much sense to create virtual raster from GeoPackages, while it may break the layer uri when the output table name is specified.
  • Loading branch information
borysiasty committed Sep 12, 2018
1 parent 60fa8ea commit fd0d557
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gui/qgsrasterlayersaveasdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,12 +321,15 @@ void QgsRasterLayerSaveAsDialog::mFormatComboBox_currentIndexChanged( const QStr
}
mFilename->setFilter( filter );

// Disable mTileModeCheckBox for GeoPackages
mTileModeCheckBox->setEnabled( outputFormat() != QStringLiteral( "GPKG" ) );
mFilename->setConfirmOverwrite( outputFormat() != QStringLiteral( "GPKG" ) );
mLayerName->setEnabled( outputFormat() == QStringLiteral( "GPKG" ) );
if ( mLayerName->isEnabled() )
{
QString layerName = QFileInfo( mFilename->filePath() ).baseName();
mLayerName->setText( layerName );
mTileModeCheckBox->setChecked( false );
}
else
{
Expand Down

0 comments on commit fd0d557

Please sign in to comment.