mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-03 00:04:47 -04:00
Merge pull request #63342 from alexbruy/identify-menu-item-names
show layer name in the identify menu if there are overlapping features from the same layer (fix #50049)
This commit is contained in:
commit
9609c3fc2c
@ -428,6 +428,11 @@ void QgsIdentifyMenu::addVectorLayer( QgsVectorLayer *layer, const QList<QgsMapT
|
||||
if ( featureTitle.isEmpty() )
|
||||
featureTitle = QString::number( result.mFeature.id() );
|
||||
|
||||
// if results are from the same layer we still add layer name to the feature
|
||||
// title to be consistent with other cases, see https://github.com/qgis/QGIS/issues/50049
|
||||
if ( layerMenu == this )
|
||||
featureTitle = QStringLiteral( "%1 (%2)" ).arg( layer->name(), featureTitle );
|
||||
|
||||
if ( customFeatureActions.isEmpty() && ( !featureActionMenu || featureActionMenu->actions().isEmpty() ) )
|
||||
{
|
||||
featureAction = new QAction( featureTitle, layerMenu );
|
||||
|
Loading…
x
Reference in New Issue
Block a user