Navigation Menu

Skip to content

Commit

Permalink
Changing the subset string while editing is not allowed as current
Browse files Browse the repository at this point in the history
feature ids might depend on the current filter
  • Loading branch information
jef-n committed Apr 7, 2019
1 parent b618e8d commit 9464105
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/qgslayertreeviewfilterindicator.cpp
Expand Up @@ -35,7 +35,7 @@ void QgsLayerTreeViewFilterIndicatorProvider::onIndicatorClicked( const QModelIn
return;

QgsVectorLayer *vlayer = qobject_cast<QgsVectorLayer *>( QgsLayerTree::toLayer( node )->layer() );
if ( !vlayer )
if ( !vlayer || vlayer->isEditable() )
return;

// launch the query builder
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsvectorlayer.cpp
Expand Up @@ -870,9 +870,9 @@ QString QgsVectorLayer::subsetString() const

bool QgsVectorLayer::setSubsetString( const QString &subset )
{
if ( !mValid || !mDataProvider )
if ( !mValid || !mDataProvider || mEditBuffer )
{
QgsDebugMsgLevel( QStringLiteral( "invoked with invalid layer or null mDataProvider" ), 3 );
QgsDebugMsgLevel( QStringLiteral( "invoked with invalid layer or null mDataProvider or while editing" ), 3 );
return false;
}

Expand Down

0 comments on commit 9464105

Please sign in to comment.