Skip to content
Permalink
Browse files

Merge pull request #36349 from troopa81/fix_rename_user_expr

Don't add another user expression when changing its label
  • Loading branch information
elpaso committed May 15, 2020
2 parents 157e437 + 279909a commit c13b677e57a085b802220a658b958d1bfa36370b
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/gui/qgsexpressionbuilderwidget.cpp
@@ -927,6 +927,12 @@ void QgsExpressionBuilderWidget::editSelectedUserExpression()

if ( dlg.exec() == QDialog::DialogCode::Accepted )
{
// label has changed removed the old one before adding the new one
if ( dlg.label() != item->text() )
{
mExpressionTreeView->removeFromUserExpressions( item->text() );
}

mExpressionTreeView->saveToUserExpressions( dlg.label(), dlg.expression(), dlg.helpText() );
}
}

0 comments on commit c13b677

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