-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show Feature Count shows wrong numbers with rule-based classification when rules were copied/pasted via the contextmenu #40206
Comments
@pathmapper same as #37799 ? |
@gioman I'd say yes. |
@gioman I'd say no, because if I understood it correct #37799 is not about showing wrong numbers, instead it's about showing the total number of features even if a filter is applied. I'd say that #37799 is a duplicate of this feature request: #29458 The issue reported in this ticket here is about showing wrong numbers. The count number 23 shown is totally wrong and has nothing to do with the total number of features. 23 is the total number of features minus all features which are not Correct would be:
|
Did you toggle the count when you had only two classes? This would indicate so. |
@roya0045 no, just reproduced the issue: |
What if you use the category symbology first to get the classes and then switch to rule-based? Or used the refine selected rules button instead of doing it all one by one? |
Ok I think this is enough to isolate the issue. When counting features the rulekeys for feature is used
In the rule based render the keys are generated at the start
But to maintain some usability those keys are not changed when cloning. QGIS/src/core/symbology/qgsrulebasedrenderer.cpp Line 1039 in 842e765
@nyalldawson would it be a good idea to use the filter expression as a key? I know that this can be more complex with nested symbols as there can be duplicates in different branches. But my older PR has code to get a full comprehensive expression string for each 'node', this would solve that issue. |
Describe the bug
Show Feature Count
shows wrong numbers with rule-based classification when rules were copied/pasted via the contextmenu.How to Reproduce
Data used in the test cases of this ticket is from
WFS:
https://geoservices.krzn.de/security-proxy/services/wfs_verb_grenzen
Layer:
gis:gemeindegrenzen
Show Feature Count
.QGIS and OS versions
Additional context
The similiar issue #39318 was closed because it was not reproducible.
There's something wrong in general with
Show feature count
for rule-based classification: #27893, #27892The text was updated successfully, but these errors were encountered: