Skip to content
Permalink
Browse files

Avoid Qt warning due to null action

  • Loading branch information
nyalldawson committed Mar 14, 2017
1 parent 2654c72 commit 798f0f7b1f61d65bb9e3a938e7f1fc46ded1a5f5
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/app/qgsapplayertreeviewmenuprovider.cpp
@@ -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() ) );

0 comments on commit 798f0f7

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