Skip to content
Permalink
Browse files

Don't add default actions multiple times

Fix #16013
  • Loading branch information
m-kuhn committed Jan 3, 2017
1 parent 9fd65a2 commit d12c41f23240f488202b83ffda3bbb94f5c4311b
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/app/qgsattributeactiondialog.cpp
@@ -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()
@@ -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;
}

0 comments on commit d12c41f

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