Skip to content
Permalink
Browse files

layer context menu: disable/enable 'Filter...' entry instead of leavi…

…ng it out if layer is editable
  • Loading branch information
jef-n committed Jun 18, 2015
1 parent 012f322 commit 0a643ce6704996c3c5e2b4e8cc17848db5d7ea42
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/app/qgsapplayertreeviewmenuprovider.cpp
@@ -150,8 +150,11 @@ QMenu* QgsAppLayerTreeViewMenuProvider::createContextMenu()
menu->addAction( tr( "Save As..." ), QgisApp::instance(), SLOT( saveAsFile() ) );
menu->addAction( tr( "Save As Layer Definition File..." ), QgisApp::instance(), SLOT( saveAsLayerDefinition() ) );

if ( !vlayer->isEditable() && vlayer->dataProvider()->supportsSubsetString() )
menu->addAction( tr( "&Filter..." ), QgisApp::instance(), SLOT( layerSubsetString() ) );
if ( vlayer->dataProvider()->supportsSubsetString() )
{
QAction *action = menu->addAction( tr( "&Filter..." ), QgisApp::instance(), SLOT( layerSubsetString() ) );
action->setEnabled( !vlayer->isEditable() );
}

menu->addAction( actions->actionShowFeatureCount( menu ) );

0 comments on commit 0a643ce

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