Skip to content

Commit

Permalink
Avoid Qt warning due to null action
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 14, 2017
1 parent 2654c72 commit 798f0f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/qgsapplayertreeviewmenuprovider.cpp
Expand Up @@ -129,7 +129,9 @@ QMenu *QgsAppLayerTreeViewMenuProvider::createContextMenu()
if ( !layer->isInScaleRange( mCanvas->scale() ) )
menu->addAction( tr( "Zoom to &Visible Scale" ), QgisApp::instance(), SLOT( zoomToLayerScale() ) );

menu->addAction( actions->actionCheckAndAllParents( menu ) );
QAction *checkAll = actions->actionCheckAndAllParents( menu );
if ( checkAll )
menu->addAction( checkAll );

// set layer crs
menu->addAction( QgsApplication::getThemeIcon( QStringLiteral( "/mActionSetCRS.png" ) ), tr( "Set Layer CRS" ), QgisApp::instance(), SLOT( setLayerCrs() ) );
Expand Down

0 comments on commit 798f0f7

Please sign in to comment.