Skip to content
Permalink
Browse files

Merge pull request #1966 from olivierdalang/show_selected_features_AL…

…L_IF_NO_SEL

Filter the attribute table only by selection if there is one

Fix #7541
  • Loading branch information
m-kuhn committed Apr 28, 2015
2 parents 0f35192 + f9ee7a3 commit 288b242aa943bce816a91aaa3d96658efadbf9e0
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/gui/attributetable/qgsattributetablefiltermodel.cpp
@@ -177,7 +177,7 @@ bool QgsAttributeTableFilterModel::filterAcceptsRow( int sourceRow, const QModel
return mFilteredFeatures.contains( masterModel()->rowToId( sourceRow ) );

case ShowSelected:
return layer()->selectedFeaturesIds().contains( masterModel()->rowToId( sourceRow ) );
return layer()->selectedFeaturesIds().isEmpty() || layer()->selectedFeaturesIds().contains( masterModel()->rowToId( sourceRow ) );

case ShowVisible:
return mFilteredFeatures.contains( masterModel()->rowToId( sourceRow ) );

0 comments on commit 288b242

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