Skip to content
Permalink
Browse files

Changing the subset string while editing is not allowed as current

feature ids might depend on the current filter
  • Loading branch information
jef-n committed Apr 7, 2019
1 parent b618e8d commit 9464105cde70042e9e4468fdf9e12f5ec866e0e0
Showing with 3 additions and 3 deletions.
  1. +1 −1 src/app/qgslayertreeviewfilterindicator.cpp
  2. +2 −2 src/core/qgsvectorlayer.cpp
@@ -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
@@ -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;
}

0 comments on commit 9464105

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