Opened 13 years ago
Last modified 13 years ago
#3226 reopened patch
Patch for showing number of features per class in legend
Reported by: | mhugent | Owned by: | timlinux |
---|---|---|---|
Priority: | minor: annoyance | Milestone: | Version 1.7.0 |
Component: | GUI | Version: | |
Keywords: | Cc: | mayeulk | |
Must Fix for Release: | No | Platform: | All |
Platform Version: | Awaiting user input: | no |
Description
The following patch adds the capability of showing the number of features per class in the legend (updated after symbology change or attribute edit). To enable this feature, select the check box in the options dialog (general->show number of features in legend).
But I'm not sure if it is good to set that in the option or if it would be better to store it in the vectorlayer and expose through the vector property dialog. Because for large layers, it might take some time to update the feature count.
What do you think about it?
Attachments (1)
Change History (8)
by , 13 years ago
Attachment: | 101118_qgis_featurecount.diff added |
---|
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Thanks for your feedback. The patch is applied now in r14714. The feature count can be enabled per layer (right click menu of the legend layer).
comment:3 by , 13 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Hi, I had been waiting for this, thanks[[BR]]
Still it does not seem to work for rule-based rendering.
(I use the following type of rules:
tags like '%"place"="town"%'
on OSM data).
comment:4 by , 13 years ago
It does not work either with simpler rules like:
place='town'
(if you have the town field)
comment:6 by , 13 years ago
comment:7 by , 13 years ago
Cc: | added |
---|
Hi Marco
I tested out your patch - cool addition! Yes I agree it is probably better to add as a general property of the layer - I tested with a large dataset and it seemed to spend a significant amount of time updating feature counts.
On a purely cosmetic level it might be nicer to put the counts in square brackets after the class name e.g.
Regards
Tim