Bug report #21107

Print Composer: Lock layers + style and Follow map theme

Added by Casper Bertelsen about 5 years ago. Updated about 5 years ago.

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


I have two issues that sort of revolves around the same thing, that is when I want to show specific layers in my map windows in the print composer.
I've tried both using the setting Follow map theme and Lock layers combined with Lock styles for layers, because I usually have more than one style linked to one layer.

Style 1: Showing points as stars
No scale-dependent visibility

Style 2: Showing points as circles
Scale-dependent visibility (1:1000)

My composer contains a map and a legend. The composer is set up to build and atlas (Two polygons. One showing at 1:8000, One at 1:500)

Issue using Follow map theme:

My map follows map theme Style 1, showing stars at any scale. Works fine until I change the theme in QGIS main window to Style 2, showing circles up to 1:1000.
Now my print composer show stars on the polygon in scale 1:500, but no stars on the polygon 1:8000.
The legend has also updated to show points as circles, even though the map shows stars.

Issue using Lock layers:

After that I tried to lock layers and styles instead. Now the legend will show points as stars even though I change to theme (and style) in the main windows to show circles. Just as I would expect. However when I change to style 2 in the main windows, no points will be shown in 1:8000, thus using the scale-dependency of the current style instead of what the style locked on i set to.

I've attached a project and data following the example.

Print_composer_diff_style.zip (22.6 KB) Casper Bertelsen, 2019-01-26 11:55 AM


#1 Updated by Alexis Roy-L about 5 years ago

This seems to be related to my issue #21101

Have you tried with the auto-update on and check if the same behaviour occurred.

The legend is somewhat linked to the map canvas when it isn't in auto update.

#2 Updated by Giovanni Manghi about 5 years ago

  • Status changed from Open to Feedback

#3 Updated by Casper Bertelsen about 5 years ago

Same issue with auto-update on. (With auto-update I wouldn't be able to hide / remove layers from the legend that aren't relevant, i.e. background raster)

Legend still changes and the composer is affected by the scale-dependent visibility of "the current style" in the main window, so that points aren't shown at scales larger than 1:1000.

#4 Updated by Giovanni Manghi about 5 years ago

  • Status changed from Feedback to Open

Also available in: Atom PDF