Skip to content

Commit

Permalink
layer selection identify: show 'all' layers only when there are multi…
Browse files Browse the repository at this point in the history
…ple layers
  • Loading branch information
jef-n committed May 5, 2014
1 parent 18ac13c commit 466631c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/gui/qgsmaptoolidentify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) );
Expand Down

0 comments on commit 466631c

Please sign in to comment.