Skip to content

Commit

Permalink
Fix Virtual layers display with empty subsetstring
Browse files Browse the repository at this point in the history
Fixes #19721

Virtual layers incorrectly show no feature when the expression filter string is empty, instead of correctly showing all the features.

Subset string needs to be tested against Empty instead of Null in order to correctly populate the wheres list and prepare a well formed SQL query string.

(cherry picked from commit 99696b6)
  • Loading branch information
agiudiceandrea authored and nyalldawson committed Aug 31, 2018
1 parent 60fed67 commit 0521bfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/virtual/qgsvirtuallayerfeatureiterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ QgsVirtualLayerFeatureIterator::QgsVirtualLayerFeatureIterator( QgsVirtualLayerF
QStringList wheres;
QString offset;
QString subset = mSource->mSubset;
if ( !subset.isNull() )
if ( !subset.isEmpty() )
{
wheres << subset;
}
Expand Down

0 comments on commit 0521bfc

Please sign in to comment.