Skip to content
Permalink
Browse files

layer selection identify: show 'all' layers only when there are multi…

…ple layers
  • Loading branch information
jef-n committed May 5, 2014
1 parent 18ac13c commit 466631c1f5ebc754769ac1fc26da29ffaef4bafe
Showing with 6 additions and 3 deletions.
  1. +6 −3 src/gui/qgsmaptoolidentify.cpp
@@ -149,9 +149,12 @@ QList<QgsMapToolIdentify::IdentifyResult> QgsMapToolIdentify::identify( int x, i
layerSelectionMenu.addAction( action );
}

QAction *action = new QAction( tr( "All (%1)" ).arg( idResult.size() ), 0 );
connect( action, SIGNAL( hovered() ), this, SLOT( handleMenuHover() ) );
layerSelectionMenu.addAction( action );
if ( mLayerIdResults.size() > 1 )
{
QAction *action = new QAction( tr( "All (%1)" ).arg( idResult.size() ), 0 );
connect( action, SIGNAL( hovered() ), this, SLOT( handleMenuHover() ) );
layerSelectionMenu.addAction( action );
}

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

0 comments on commit 466631c

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