Skip to content
Permalink
Browse files

Fixes #36192 : remove old user expression when changing its label

  • Loading branch information
troopa81 committed May 11, 2020
1 parent 02df257 commit 279909a1393744d6fc068cb61f07cc5410408462
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 279909a

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