Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 288b242
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/attributetable/qgsattributetablefiltermodel.cpp
Expand Up @@ -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 ) );
Expand Down

0 comments on commit 288b242

Please sign in to comment.