Skip to content

Commit

Permalink
Keep state for expression widget splitter
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed May 22, 2014
1 parent 46086b2 commit 83a9c65
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/gui/qgsexpressionbuilderwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <QMenu>
#include <QFile>
#include <QTextStream>
#include <QSettings>

QgsExpressionBuilderWidget::QgsExpressionBuilderWidget( QWidget *parent )
: QWidget( parent )
Expand Down Expand Up @@ -104,12 +105,18 @@ QgsExpressionBuilderWidget::QgsExpressionBuilderWidget( QWidget *parent )
}

txtSearchEdit->setPlaceholderText( tr( "Search" ) );

QSettings settings;
splitter->restoreState( settings.value("/windows/QgsExpressionBuilderWidget/splitter").toByteArray() );
splitter_2->restoreState( settings.value("/windows/QgsExpressionBuilderWidget/splitter2").toByteArray() );
}


QgsExpressionBuilderWidget::~QgsExpressionBuilderWidget()
{

QSettings settings;
settings.setValue("/windows/QgsExpressionBuilderWidget/splitter", splitter->saveState() );
settings.setValue("/windows/QgsExpressionBuilderWidget/splitter2", splitter_2->saveState() );
}

void QgsExpressionBuilderWidget::setLayer( QgsVectorLayer *layer )
Expand Down

0 comments on commit 83a9c65

Please sign in to comment.