Skip to content
Permalink
Browse files

Always load user exp when context is set

... and avoid loading recent exp and fields twice
  • Loading branch information
elpaso committed Dec 18, 2019
1 parent 89bddec commit 7f8ef8c47052e733184c30c27ce984f8df6159fa
Showing with 1 addition and 3 deletions.
  1. +1 −0 src/gui/qgsexpressionbuilderwidget.cpp
  2. +0 −3 src/gui/qgsexpressionselectiondialog.cpp
@@ -785,6 +785,7 @@ void QgsExpressionBuilderWidget::setExpressionContext( const QgsExpressionContex
updateFunctionTree();
loadFieldNames();
loadRecent( mRecentKey );
loadUserExpressions( );
}

void QgsExpressionBuilderWidget::txtExpressionString_textChanged()
@@ -57,9 +57,6 @@ QgsExpressionSelectionDialog::QgsExpressionSelectionDialog( QgsVectorLayer *laye

mExpressionBuilder->setLayer( layer );
mExpressionBuilder->setExpressionText( startText );
mExpressionBuilder->loadFieldNames();
mExpressionBuilder->loadRecent( QStringLiteral( "Selection" ) );
mExpressionBuilder->loadUserExpressions( );

QgsExpressionContext context( QgsExpressionContextUtils::globalProjectLayerScopes( mLayer ) );
mExpressionBuilder->setExpressionContext( context );

0 comments on commit 7f8ef8c

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