Skip to content

Commit 6303154

Browse files
committed
Merge pull request #2087 from slarosa/fix_function_editor
Fix for function editor
2 parents bfabb85 + 89477af commit 6303154

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/gui/qgsexpressionbuilderwidget.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ void QgsExpressionBuilderWidget::runPythonCode( QString code )
131131
QgsPythonRunner::run( pythontext );
132132
}
133133
updateFunctionTree();
134+
loadFieldNames();
135+
loadRecent( mRecentKey );
134136
}
135137

136138
void QgsExpressionBuilderWidget::saveFunctionFile( QString fileName )
@@ -346,6 +348,7 @@ void QgsExpressionBuilderWidget::saveToRecent( QString key )
346348

347349
void QgsExpressionBuilderWidget::loadRecent( QString key )
348350
{
351+
mRecentKey = key;
349352
QString name = tr( "Recent (%1)" ).arg( key );
350353
if ( mExpressionGroups.contains( name ) )
351354
{

src/gui/qgsexpressionbuilderwidget.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ class GUI_EXPORT QgsExpressionBuilderWidget : public QWidget, private Ui::QgsExp
218218
QgsExpressionHighlighter* highlighter;
219219
bool mExpressionValid;
220220
QgsDistanceArea mDa;
221+
QString mRecentKey;
221222

222223
};
223224

0 commit comments

Comments
 (0)