Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't add default actions multiple times
Fix #16013
  • Loading branch information
m-kuhn committed Jan 3, 2017
1 parent 9fd65a2 commit d12c41f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app/qgsattributeactiondialog.cpp
Expand Up @@ -150,7 +150,8 @@ void QgsAttributeActionDialog::insertRow( int row, const QgsAction& action )

void QgsAttributeActionDialog::insertRow( int row, QgsAction::ActionType type, const QString& name, const QString& actionText, const QString& iconPath, bool capture, const QString& shortTitle, const QSet<QString>& actionScopes )
{
insertRow( row, QgsAction( type, name, actionText, iconPath, capture, shortTitle, actionScopes ) );
if ( uniqueName( name ) == name )
insertRow( row, QgsAction( type, name, actionText, iconPath, capture, shortTitle, actionScopes ) );
}

void QgsAttributeActionDialog::moveUp()
Expand Down Expand Up @@ -356,7 +357,7 @@ QString QgsAttributeActionDialog::uniqueName( QString name )

for ( int i = 0; i < pos; ++i )
{
if ( mAttributeActionTable->item( i, 0 )->text() == name )
if ( mAttributeActionTable->item( i, Description )->text() == name )
unique = false;
}

Expand Down

0 comments on commit d12c41f

Please sign in to comment.