Skip to content

Commit

Permalink
[ui] fix raster save as vrt tiles groupbox hidden when on by default
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Jul 2, 2018
1 parent f43adf7 commit a9f253c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/gui/qgsrasterlayersaveasdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ QgsRasterLayerSaveAsDialog::QgsRasterLayerSaveAsDialog( QgsRasterLayer *rasterLa
// don't restore nodata, it needs user input
// pyramids are not necessarily built every time

mTilesGroupBox->hide();

mCrsSelector->setLayerCrs( mLayerCrs );
//default to layer CRS - see https://issues.qgis.org/issues/14209 for discussion
mCrsSelector->setCrs( mLayerCrs );
Expand Down Expand Up @@ -163,14 +161,17 @@ QgsRasterLayerSaveAsDialog::QgsRasterLayerSaveAsDialog( QgsRasterLayer *rasterLa

if ( mTileModeCheckBox->isChecked() )
{
mTilesGroupBox->show();
mFilename->setStorageMode( QgsFileWidget::GetDirectory );
mFilename->setDialogTitle( tr( "Select output directory" ) );
mFilename->setDialogTitle( tr( "Select Output Directory" ) );
}
else
{
mTilesGroupBox->hide();
mFilename->setStorageMode( QgsFileWidget::SaveFile );
mFilename->setDialogTitle( tr( "Save Layer As" ) );
}

mFilename->setDefaultRoot( settings.value( QStringLiteral( "UI/lastRasterFileDir" ), QDir::homePath() ).toString() );
connect( mFilename, &QgsFileWidget::fileChanged, this, [ = ]( const QString & filePath )
{
Expand Down Expand Up @@ -711,7 +712,7 @@ void QgsRasterLayerSaveAsDialog::mTileModeCheckBox_toggled( bool toggled )
// Show / hide tile options
mTilesGroupBox->show();
mFilename->setStorageMode( QgsFileWidget::GetDirectory );
mFilename->setDialogTitle( tr( "Select output directory" ) );
mFilename->setDialogTitle( tr( "Select Output Directory" ) );
}
else
{
Expand Down

0 comments on commit a9f253c

Please sign in to comment.