Skip to content
Permalink
Browse files

Apply FilterRect in combination with other filters

  • Loading branch information
m-kuhn committed Jul 15, 2015
1 parent b47b9a5 commit cfe91f82613210a38112bb2772a11c7a08a91c5b
Showing with 2 additions and 3 deletions.
  1. +0 −1 src/core/qgsfeaturerequest.cpp
  2. +2 −2 src/core/qgsfeaturerequest.h
@@ -87,7 +87,6 @@ QgsFeatureRequest::~QgsFeatureRequest()

QgsFeatureRequest& QgsFeatureRequest::setFilterRect( const QgsRectangle& rect )
{
mFilter = FilterRect;
mFilterRect = rect;
return *this;
}
@@ -70,7 +70,7 @@ class CORE_EXPORT QgsFeatureRequest
enum FilterType
{
FilterNone, //!< No filter is applied
FilterRect, //!< Filter using a rectangle, no need to set NoGeometry
FilterRect, //!< Obsolete, will be ignored. If a filterRect is set it will be used anyway. Filter using a rectangle, no need to set NoGeometry. Instead check for request.filterRect().isNull()
FilterFid, //!< Filter using feature ID
FilterExpression, //!< Filter using expression
FilterFids //!< Filter using feature IDs
@@ -93,7 +93,7 @@ class CORE_EXPORT QgsFeatureRequest

~QgsFeatureRequest();

FilterType filterType() const { return mFilter; }
FilterType filterType() const { if ( mFilter == FilterNone && !mFilterRect.isNull() ) return FilterRect; else return mFilter; }

//! Set rectangle from which features will be taken. Empty rectangle removes the filter.
//!

0 comments on commit cfe91f8

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