Bug report #14131

QGIS 2.12.1 - Filter legend by map content has new bug

Added by Chris Paul about 1 year ago. Updated about 1 year ago.

Status:Closed Start Date:12/01/2015
Priority:High Due date:
Assigned to:Nyall Dawson % Done:

0%

Category:Map Legend
Target version:-
Platform: Pull Request or Patch supplied:No
Platform version: Affected version:2.12.0
Status info: Causes crash or corruption:No
Resolution: Tag:

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

duplicates QGIS Application - Bug report #13931: QGIS 2.12.1 - Filter legend by map content has new bug Closed 12/01/2015

Associated revisions

Revision 39e1f68ccc6dd4918614ac0df1e6bc0a92f6a725
Added by Nyall Dawson about 1 year ago

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

Updated by Saber Razmjooei about 1 year ago

  • Category set to Map Legend
  • Status changed from Open to Feedback

Could you try in master or 2.12.2 and report back?

Updated by Chris Paul about 1 year 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.

Updated by Nyall Dawson about 1 year ago

Hi Chris - looks like you forgot to attach the project/data

Updated by Chris Paul about 1 year 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.

Updated by Nyall Dawson about 1 year ago

  • Assigned to set to Nyall Dawson

Updated by Nyall Dawson about 1 year ago

  • Status changed from Feedback to Closed

Also available in: Atom