Skip to content

Commit 5f77a48

Browse files
committedDec 2, 2017
Remember window geometry for raster save dialog
1 parent 9e4518f commit 5f77a48

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed
 

‎python/gui/qgsrasterlayersaveasdialog.sip

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class QgsRasterLayerSaveAsDialog: QDialog
3939
const QgsCoordinateReferenceSystem &currentCrs,
4040
QWidget *parent /TransferThis/ = 0,
4141
Qt::WindowFlags f = 0 );
42+
~QgsRasterLayerSaveAsDialog();
4243

4344
Mode mode() const;
4445
%Docstring

‎src/gui/qgsrasterlayersaveasdialog.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,15 @@ QgsRasterLayerSaveAsDialog::QgsRasterLayerSaveAsDialog( QgsRasterLayer *rasterLa
158158
connect( mExtentGroupBox, &QgsExtentGroupBox::extentChanged, this, &QgsRasterLayerSaveAsDialog::extentChanged );
159159

160160
recalcResolutionSize();
161+
162+
QgsSettings settings;
163+
restoreGeometry( settings.value( QStringLiteral( "Windows/RasterLayerSaveAs/geometry" ) ).toByteArray() );
164+
}
165+
166+
QgsRasterLayerSaveAsDialog::~QgsRasterLayerSaveAsDialog()
167+
{
168+
QgsSettings settings;
169+
settings.setValue( QStringLiteral( "Windows/RasterLayerSaveAs/geometry" ), saveGeometry() );
161170
}
162171

163172
void QgsRasterLayerSaveAsDialog::insertAvailableOutputFormats()

‎src/gui/qgsrasterlayersaveasdialog.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ class GUI_EXPORT QgsRasterLayerSaveAsDialog: public QDialog, private Ui::QgsRast
5858
const QgsCoordinateReferenceSystem &currentCrs,
5959
QWidget *parent SIP_TRANSFERTHIS = nullptr,
6060
Qt::WindowFlags f = 0 );
61+
~QgsRasterLayerSaveAsDialog();
6162

6263
Mode mode() const;
6364
int nColumns() const;

0 commit comments

Comments
 (0)
Please sign in to comment.