Skip to content

Commit

Permalink
Merge pull request #60240 from uclaros/fix-edit-filter-while-editing
Browse files Browse the repository at this point in the history
Disable editing of filters while editing for all layer types
  • Loading branch information
troopa81 authored Jan 23, 2025
2 parents f33604b + 0352ef2 commit f75d66f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/app/qgslayertreeviewfilterindicator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ void QgsLayerTreeViewFilterIndicatorProvider::onIndicatorClicked( const QModelIn
return;

QgsMapLayer *layer = QgsLayerTree::toLayer( node )->layer();
QgsVectorLayer *vl = qobject_cast<QgsVectorLayer *>( layer );
if ( vl && vl->isEditable() )
if ( layer && layer->isEditable() )
{
QgisApp::instance()->messageBar()->pushWarning( tr( "Edit filter" ), tr( "Cannot edit filter when layer is in edit mode" ) );
return;
Expand Down

0 comments on commit f75d66f

Please sign in to comment.