Skip to content

Commit

Permalink
[ui] save geometry dialog for the symbol selector dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
slarosa committed Oct 12, 2015
1 parent 6f5f672 commit 4d35175
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/gui/symbology-ng/qgssymbolv2selectordialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ QgsSymbolV2SelectorDialog::QgsSymbolV2SelectorDialog( QgsSymbolV2* symbol, QgsSt
mPresentWidget = NULL;

setupUi( this );

QSettings settings;
restoreGeometry( settings.value( "/Windows/SymbolSelectorDialog/geometry" ).toByteArray() );

// can be embedded in renderer properties dialog
if ( embedded )
{
Expand Down Expand Up @@ -259,6 +263,12 @@ QgsSymbolV2SelectorDialog::QgsSymbolV2SelectorDialog( QgsSymbolV2* symbol, QgsSt
layersTree->setCurrentIndex( newIndex );
}

QgsSymbolV2SelectorDialog::~QgsSymbolV2SelectorDialog()
{
QSettings settings;
settings.setValue( "/Windows/SymbolSelectorDialog/geometry", saveGeometry() );
}

void QgsSymbolV2SelectorDialog::keyPressEvent( QKeyEvent * e )
{
// Ignore the ESC key to avoid close the dialog without the properties window
Expand Down
1 change: 1 addition & 0 deletions src/gui/symbology-ng/qgssymbolv2selectordialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class GUI_EXPORT QgsSymbolV2SelectorDialog : public QDialog, private Ui::QgsSymb

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

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

0 comments on commit 4d35175

Please sign in to comment.