Skip to content
Permalink
Browse files

[ui] save geometry dialog for the symbol selector dialog

  • Loading branch information
slarosa committed Oct 12, 2015
1 parent 6f5f672 commit 4d351756cb1580a3cc67819426504f91fcd6d8a9
@@ -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 )
{
@@ -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
@@ -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();

0 comments on commit 4d35175

Please sign in to comment.
You can’t perform that action at this time.