Skip to content

Commit

Permalink
Remember window geometry for raster save dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 2, 2017
1 parent 9e4518f commit 5f77a48
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions python/gui/qgsrasterlayersaveasdialog.sip
Expand Up @@ -39,6 +39,7 @@ class QgsRasterLayerSaveAsDialog: QDialog
const QgsCoordinateReferenceSystem &currentCrs,
QWidget *parent /TransferThis/ = 0,
Qt::WindowFlags f = 0 );
~QgsRasterLayerSaveAsDialog();

Mode mode() const;
%Docstring
Expand Down
9 changes: 9 additions & 0 deletions src/gui/qgsrasterlayersaveasdialog.cpp
Expand Up @@ -158,6 +158,15 @@ QgsRasterLayerSaveAsDialog::QgsRasterLayerSaveAsDialog( QgsRasterLayer *rasterLa
connect( mExtentGroupBox, &QgsExtentGroupBox::extentChanged, this, &QgsRasterLayerSaveAsDialog::extentChanged );

recalcResolutionSize();

QgsSettings settings;
restoreGeometry( settings.value( QStringLiteral( "Windows/RasterLayerSaveAs/geometry" ) ).toByteArray() );
}

QgsRasterLayerSaveAsDialog::~QgsRasterLayerSaveAsDialog()
{
QgsSettings settings;
settings.setValue( QStringLiteral( "Windows/RasterLayerSaveAs/geometry" ), saveGeometry() );
}

void QgsRasterLayerSaveAsDialog::insertAvailableOutputFormats()
Expand Down
1 change: 1 addition & 0 deletions src/gui/qgsrasterlayersaveasdialog.h
Expand Up @@ -58,6 +58,7 @@ class GUI_EXPORT QgsRasterLayerSaveAsDialog: public QDialog, private Ui::QgsRast
const QgsCoordinateReferenceSystem &currentCrs,
QWidget *parent SIP_TRANSFERTHIS = nullptr,
Qt::WindowFlags f = 0 );
~QgsRasterLayerSaveAsDialog();

Mode mode() const;
int nColumns() const;
Expand Down

0 comments on commit 5f77a48

Please sign in to comment.