Skip to content

Commit 466631c

Browse files
committed
layer selection identify: show 'all' layers only when there are multiple layers
1 parent 18ac13c commit 466631c

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎src/gui/qgsmaptoolidentify.cpp‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,12 @@ QList<QgsMapToolIdentify::IdentifyResult> QgsMapToolIdentify::identify( int x, i
149149
layerSelectionMenu.addAction( action );
150150
}
151151

152-
QAction *action = new QAction( tr( "All (%1)" ).arg( idResult.size() ), 0 );
153-
connect( action, SIGNAL( hovered() ), this, SLOT( handleMenuHover() ) );
154-
layerSelectionMenu.addAction( action );
152+
if ( mLayerIdResults.size() > 1 )
153+
{
154+
QAction *action = new QAction( tr( "All (%1)" ).arg( idResult.size() ), 0 );
155+
connect( action, SIGNAL( hovered() ), this, SLOT( handleMenuHover() ) );
156+
layerSelectionMenu.addAction( action );
157+
}
155158

156159
// exec layer selection menu
157160
QPoint globalPos = mCanvas->mapToGlobal( QPoint( x + 5, y + 5 ) );

0 commit comments

Comments
 (0)