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.
(cherry-picked from 89477af)
  • Loading branch information
slarosa committed Jul 13, 2015
1 parent 0919fe7 commit ba36bb6
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
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ void QgsExpressionBuilderWidget::runPythonCode( QString code )
QgsPythonRunner::run( pythontext );
}
updateFunctionTree();
loadFieldNames();
loadRecent( mRecentKey );
}

void QgsExpressionBuilderWidget::saveFunctionFile( QString fileName )
Expand Down Expand Up @@ -347,6 +349,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
Original file line number Diff line number Diff line change
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 ba36bb6

Please sign in to comment.