qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.29k stars 2.96k forks source link

Layer Symbology/Legend in Layers Panel not reflecting Filter state #29611

Open qgib opened 5 years ago

qgib commented 5 years ago

Author Name: Brett Carlock (@Saijin-Naib) Original Redmine Issue: 21796 Affected QGIS version: 3.6.1 Redmine category:map_legend


If I take a layer that has 458 features intially, symbolized using Categorized renderer by CompleteStreetName (so each has a random color assigned), the layer list will show all features in the panel when expanded (as expected).

If I turn on count features, it'll show me 458 features next to the Layer name, and a [1] next to each feature under the Layer's name (as expected).

However, if I put a filter on this same layer that reduces the number of features to 24, the layer will still show all 458 originally classified features, each with their current [1] count. I do not expect this. I would expect the filtered features to also be similarly filtered out of the layer symbology/legend/count.


qgib commented 5 years ago

Author Name: Alexis Roy-L (Alexis Roy-L)


This is not a bug this is normal. My feature in review will solve this, if used properly.

The feature count is the count of feature for a given symbol, the legend filter filters out symbols that are not visible. They do not interact and some people might need to have the total count for a given symbol even when out of scope.

qgib commented 5 years ago

Author Name: Brett Carlock (@Saijin-Naib)


Alexis Roy-L wrote:

This is not a bug this is normal. My feature in review will solve this, if used properly.

The feature count is the count of feature for a given symbol, the legend filter filters out symbols that are not visible. They do not interact and some people might need to have the total count for a given symbol even when out of scope.

I'm talking about the Filter for the data provider/layer (as pictured in the attached screenshot). If that filter is set, those features are no longer available to query, select, or do any operations on. The absolutely 100% should be filtered out of the layer's legend's symbology and the counts should reflect this.



qgib commented 5 years ago

Author Name: Giovanni Manghi (@gioman)


Pedro-Murteira commented 2 years ago

@Saijin-Naib Hello, this issue might be fixed. After filtering with the "Provider Feature Filter", the feature count adjusts correspondingly on the layer and on each feature. Can you confirm? (Tested on QGIS 3.22.3.)

Saijin-Naib commented 2 years ago

Unfiltered:
image

Filtered:
image

As before, gross record count for the layer is adjusted, but counts for classified symbols are not.

I'm filtering by CEILING = 50, so all of the symbol bins below that should now return 0 count.


QGIS version
3.22.3-Białowieża
QGIS code revision
1628765ec7
Qt version
5.15.2
Python version
3.9.5
GDAL/OGR version
3.4.1
PROJ version
8.2.1
EPSG Registry database version
v10.041 (2021-12-03)
Compiled against GEOS
3.10.0-CAPI-1.16.0
Running against GEOS
3.10.2-CAPI-1.16.0
Compiled against SQLite
3.35.2
Running against SQLite
3.37.2
PDAL version
2.3.0
PostgreSQL client version
13.0
SpatiaLite version
5.0.1
QWT version
6.1.3
QScintilla2 version
2.11.5
OS version
Windows 10 Version 2009

Active Python plugins
CalculateGeometry
0.6.4
cartography_tools
1.2.1
kmltools
3.1.15
LAStools
1.4
loadthemall
3.3.0
MemoryLayerSaver
4.0.4
pdaltools-master
0.1.5
processing_fusion
3.0
Projestions
1.0.1
qgis-maptiler-plugin
2.0.0
qgis2web
3.16.0
slyr
3.18.0
zoom_level
0.1
db_manager
0.1.20
grassprovider
2.12.99
MetaSearch
0.3.5
processing
2.12.99
sagaprovider
2.12.99
Pedro-Murteira commented 2 years ago

@Saijin-Naib thank you for re-testing. Still a valid bug then.

Saijin-Naib commented 2 years ago

@Saijin-Naib thank you for re-testing. Still a valid bug then.

Thanks for doing the work of following up on old tickets :0

Pedro-Murteira commented 2 years ago

@Saijin-Naib thank you for re-testing. Still a valid bug then.

Thanks for doing the work of following up on old tickets :0

Glad to help, cheers!