-
-
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
QgsComposerLegend.setLegendFilterByMapEnabled does not work for non-visible raster layers #19894
Comments
Author Name: Jürgen Fischer (@jef-n)
|
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Arnaud Morvan (@arnaud-morvan) Related with #22196
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
|
Author Name: Giovanni Manghi (@gioman) End of life notice: QGIS 2.18 LTR Source:
|
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
The text was updated successfully, but these errors were encountered: