Skip to content

Commit

Permalink
Also select row with largest feature so it gets highlighted
Browse files Browse the repository at this point in the history
  • Loading branch information
uclaros authored and nyalldawson committed Mar 15, 2021
1 parent def9af6 commit fd826d7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/app/qgsmergeattributesdialog.cpp
Expand Up @@ -541,8 +541,20 @@ void QgsMergeAttributesDialog::mFromLargestPushButton_clicked()
default:
return;
}
// Only proceed if we do have a largest geometry
if ( maxValue > 0 )
{
setAllAttributesFromFeature( featureId );
// Also select the appropriate row so the feature gets highlighted
for ( int row = mTableWidget->rowCount() - 1; row >= 0; --row )
{
if ( mTableWidget->verticalHeaderItem( row )->text() == FID_TO_STRING( featureId ) )
{
mTableWidget->selectRow( row );
return;
}
}
}
}

void QgsMergeAttributesDialog::mRemoveFeatureFromSelectionButton_clicked()
Expand Down

0 comments on commit fd826d7

Please sign in to comment.