Skip to content

Commit 4d35175

Browse files
committedOct 12, 2015
[ui] save geometry dialog for the symbol selector dialog
1 parent 6f5f672 commit 4d35175

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
 

‎src/gui/symbology-ng/qgssymbolv2selectordialog.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,10 @@ QgsSymbolV2SelectorDialog::QgsSymbolV2SelectorDialog( QgsSymbolV2* symbol, QgsSt
218218
mPresentWidget = NULL;
219219

220220
setupUi( this );
221+
222+
QSettings settings;
223+
restoreGeometry( settings.value( "/Windows/SymbolSelectorDialog/geometry" ).toByteArray() );
224+
221225
// can be embedded in renderer properties dialog
222226
if ( embedded )
223227
{
@@ -259,6 +263,12 @@ QgsSymbolV2SelectorDialog::QgsSymbolV2SelectorDialog( QgsSymbolV2* symbol, QgsSt
259263
layersTree->setCurrentIndex( newIndex );
260264
}
261265

266+
QgsSymbolV2SelectorDialog::~QgsSymbolV2SelectorDialog()
267+
{
268+
QSettings settings;
269+
settings.setValue( "/Windows/SymbolSelectorDialog/geometry", saveGeometry() );
270+
}
271+
262272
void QgsSymbolV2SelectorDialog::keyPressEvent( QKeyEvent * e )
263273
{
264274
// Ignore the ESC key to avoid close the dialog without the properties window

‎src/gui/symbology-ng/qgssymbolv2selectordialog.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ class GUI_EXPORT QgsSymbolV2SelectorDialog : public QDialog, private Ui::QgsSymb
7474

7575
public:
7676
QgsSymbolV2SelectorDialog( QgsSymbolV2* symbol, QgsStyleV2* style, const QgsVectorLayer* vl, QWidget* parent = 0, bool embedded = false );
77+
~QgsSymbolV2SelectorDialog();
7778

7879
//! return menu for "advanced" button - create it if doesn't exist and show the advanced button
7980
QMenu* advancedMenu();

0 commit comments

Comments
 (0)
Please sign in to comment.