Skip to content

Commit

Permalink
Fix for function editor:
Browse files Browse the repository at this point in the history
when running the script the entries "Fields and values" and "Recent"
into the functions list of the expression builder disappear.
  • Loading branch information
slarosa committed May 28, 2015
1 parent 1cbbf59 commit 89477af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gui/qgsexpressionbuilderwidget.cpp
Expand Up @@ -131,6 +131,8 @@ void QgsExpressionBuilderWidget::runPythonCode( QString code )
QgsPythonRunner::run( pythontext );
}
updateFunctionTree();
loadFieldNames();
loadRecent( mRecentKey );
}

void QgsExpressionBuilderWidget::saveFunctionFile( QString fileName )
Expand Down Expand Up @@ -346,6 +348,7 @@ void QgsExpressionBuilderWidget::saveToRecent( QString key )

void QgsExpressionBuilderWidget::loadRecent( QString key )
{
mRecentKey = key;
QString name = tr( "Recent (%1)" ).arg( key );
if ( mExpressionGroups.contains( name ) )
{
Expand Down
1 change: 1 addition & 0 deletions src/gui/qgsexpressionbuilderwidget.h
Expand Up @@ -218,6 +218,7 @@ class GUI_EXPORT QgsExpressionBuilderWidget : public QWidget, private Ui::QgsExp
QgsExpressionHighlighter* highlighter;
bool mExpressionValid;
QgsDistanceArea mDa;
QString mRecentKey;

};

Expand Down

0 comments on commit 89477af

Please sign in to comment.