Skip to content
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

QgsComposerLegend.setLegendFilterByMapEnabled does not work for non-visible raster layers #19894

Closed
qgib opened this issue Nov 13, 2014 · 5 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks

Comments

@qgib
Copy link
Contributor

qgib commented Nov 13, 2014

Author Name: Patrick Maslen Maslen (Patrick Maslen Maslen)
Original Redmine Issue: 11641
Affected QGIS version: 2.6.0
Redmine category:map_composer/printing


When a raster layer is loaded but visibility set to False (e.g. because a composer has a main map and an overview map, with the raster layer being required only for the overview map), QgsComposerLegend.setLegendFilterByMapEnabled(True) does not result in the raster layer being removed from the composer legend. Vector layers behave as expected - i.e. they are removed from the legend when the same process is applied. I understand that the method is also for limiting legend entries for vectors displayed with categorised styles, but I need a way to programmatically remove raster layers from the composer legend.

This is important for my organisation's several hundred QGIS users, most of them not highly skilled, as we create an automated map production Python plugin based on templates using a specific raster layer in the overview maps. The combination of this issue with part 2 of bug report #19589 means that I have not been able to use pyqgis to remove the raster layer from the composer legends - this may well mean we choose 2.4 rather than 2.6 for our imminent upgrade from 1.8.

Thanks

Pat

@qgib
Copy link
Contributor Author

qgib commented Jun 3, 2015

Author Name: Jürgen Fischer (@jef-n)


  • category_id was configured as Map Composer/Printing

@qgib
Copy link
Contributor Author

qgib commented Nov 7, 2015

Author Name: Giovanni Manghi (@gioman)


  • fixed_version_id removed Version 2.6

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2017

Author Name: Giovanni Manghi (@gioman)


  • easy_fix was configured as 0
  • regression was configured as 0

@qgib
Copy link
Contributor Author

qgib commented May 10, 2017

Author Name: Arnaud Morvan (@arnaud-morvan)


Related with #22196
Pull request proposed on master : #4531


  • description was changed from When a raster layer is loaded but visibility set to False (e.g. because a composer has a main map and an overview map, with the raster layer being required only for the overview map), QgsComposerLegend.setLegendFilterByMapEnabled(True) does not result in the raster layer being removed from the composer legend. Vector layers behave as expected - i.e. they are removed from the legend when the same process is applied. I understand that the method is also for limiting legend entries for vectors displayed with categorised styles, but I need a way to programmatically remove raster layers from the composer legend.

This is important for my organisation's several hundred QGIS users, most of them not highly skilled, as we create an automated map production Python plugin based on templates using a specific raster layer in the overview maps. The combination of this issue with part 2 of bug report #19589 means that I have not been able to use pyqgis to remove the raster layer from the composer legends - this may well mean we choose 2.4 rather than 2.6 for our imminent upgrade from 1.8.

Thanks

Pat to When a raster layer is loaded but visibility set to False (e.g. because a composer has a main map and an overview map, with the raster layer being required only for the overview map), QgsComposerLegend.setLegendFilterByMapEnabled(True) does not result in the raster layer being removed from the composer legend. Vector layers behave as expected - i.e. they are removed from the legend when the same process is applied. I understand that the method is also for limiting legend entries for vectors displayed with categorised styles, but I need a way to programmatically remove raster layers from the composer legend.

This is important for my organisation's several hundred QGIS users, most of them not highly skilled, as we create an automated map production Python plugin based on templates using a specific raster layer in the overview maps. The combination of this issue with part 2 of bug report #19589 means that I have not been able to use pyqgis to remove the raster layer from the composer legends - this may well mean we choose 2.4 rather than 2.6 for our imminent upgrade from 1.8.

Thanks

Pat

  • pull_request_patch_supplied was changed from 0 to 1
  • status_id was changed from Open to In Progress

@qgib
Copy link
Contributor Author

qgib commented Mar 9, 2019

Author Name: Giovanni Manghi (@gioman)


End of life notice: QGIS 2.18 LTR

Source:
http://blog.qgis.org/2019/03/09/end-of-life-notice-qgis-2-18-ltr/


  • resolution was changed from to end of life
  • status_id was changed from In Progress to Closed

@qgib qgib closed this as completed Mar 9, 2019
@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks labels May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks
Projects
None yet
Development

No branches or pull requests

1 participant