Bug report #14131
QGIS 2.12.1 - Filter legend by map content has new bug
Status: | Closed | ||
---|---|---|---|
Priority: | High | ||
Assignee: | Nyall Dawson | ||
Category: | Map Legend | ||
Affected QGIS version: | 2.12.0 | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 22133 |
Description
"Filter legend by map content" has always worked fine for me, until v2.12.0.
Now for some reason a strange glitch occurs with the legend filter for my 'BC Geology layer', which has always worked fine before.
The legend now gets filtered based on the styles present on the map, rather than the features themselves.
For instance, if the map composer only displays two features from the 'BC Geology' layer, instead of only showing THOSE two features in the legend, it shows ALL the features present in the entire attribute table which have the same STYLE as the features showing in map composer.
For example, I have the shapefile styled based on rock type. So if my map composer is showing a single 'feldspar porphyry' feature and a single 'granite' feature from that shape, the legend will display all the feldspar porphyrys and granites in the entire province of BC, because they have all been styled the same.
Related issues
Associated revisions
Fix filtering legend content by map when renderer contains
duplicate symbols (fix #14131)
Now, we don't test for map content using the symbols but instead
use the legend key during the hit test
History
#1 Updated by Saber Razmjooei almost 9 years ago
- Category set to Map Legend
- Status changed from Open to Feedback
Could you try in master or 2.12.2 and report back?
#2 Updated by Chris Paul almost 9 years ago
Yes, I downloaded master and the issue is still present.
Attached is the shapefile with the default style I'm using. Please see if you can replicate the issue.
#3 Updated by Nyall Dawson almost 9 years ago
Hi Chris - looks like you forgot to attach the project/data
#4 Updated by Chris Paul almost 9 years ago
My bad, the file was too big, so it didn't upload. Here's a dropbox link instead:
https://www.dropbox.com/sh/7v91erfz1mo8z5f/AAA3mj7GYTTZfWyWrKiVt1qna?dl=0
The .qml is included, so "restore default style" should work.
#5 Updated by Nyall Dawson almost 9 years ago
- Assignee set to Nyall Dawson
#6 Updated by Nyall Dawson almost 9 years ago
- Status changed from Feedback to Closed
Fixed in changeset 39e1f68ccc6dd4918614ac0df1e6bc0a92f6a725.