Bug report #10172

html annotation does not respect composer setting 'Lock layers for map item'

Added by Tom Grundy over 9 years ago. Updated almost 7 years ago.

Category:Map Composer/Printing
Affected QGIS version:2.2.0 Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:18626


[this is a copy of gis.stackexchange.com question here:

In the QGIS 2.2 map composer, html annotation objects do not seem to respect the 'Lock layers for map item' checkbox.

Initially, this was an attempted workaround for the question "qgis html annotation - scale dependent rendering?"

Example: your project has two layers, A and B. Each layer has one polygon or other renderable object, so that it's obvious in the composer if that layer is being drawn or not.

So, in the composer, add a map object. Initially it should show both layers' polygons (assuming you had them visible in the project when you made the composer).

In qgis, make sure either layer is highlighted in the layers palette, but don't make it editable.

Add an html annotation.

Make that current layer invisible, and notice the annotation object becomes invisible too. Empirically, that's because the annotation is owned by that layer.

Make that layer visible again.

Go to the composer and you should see the annotation on the map.

In the composer, under the Item properties for that map object, in the Main properties area, check the box for 'Lock layers for map item'. According to the docs, with this checked, it 'locks in' the current list of what layers are visible, so that if you then make a layer invisible in qgis, it will not affect what layers are visible in that map object in the composer.

Now go to qgis and make that layer invisible.

Then look in the composer again, notice the polygon or other 'real' object for that layer is still visible because you locked it, but, the annotation is not visible.

Fiddle around with variations on this theme - basically it shows that the annotation objects don't respect the 'Lock layers for map item' setting.

Associated revisions

Revision 22939736
Added by Nyall Dawson almost 7 years ago

[composer] Respect linked layer visibility when drawing annotation items (fix #10172)


#1 Updated by Jürgen Fischer over 9 years ago

  • Target version changed from Version 2.2 to Future Release - Lower Priority

#2 Updated by Nyall Dawson almost 7 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF