Skip to content

Commit

Permalink
Add menu items also if invalid (but check for it)
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Nov 5, 2018
1 parent bc4a1ef commit bcd8581
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/qgsapplayertreeviewmenuprovider.cpp
Expand Up @@ -138,6 +138,8 @@ QMenu *QgsAppLayerTreeViewMenuProvider::createContextMenu()
QgsRasterLayer *rlayer = qobject_cast<QgsRasterLayer *>( layer );
QgsVectorLayer *vlayer = qobject_cast<QgsVectorLayer *>( layer );

// TODO: check if it is not valid and offer set data source

if ( layer && layer->isSpatial() )
{
menu->addAction( actions->actionZoomToLayer( mCanvas, menu ) );
Expand Down

0 comments on commit bcd8581

Please sign in to comment.