Bug report #20055

Legend in Print Layout does not follow set map-theme

Added by Jamie Sheehan almost 4 years ago. Updated almost 4 years ago.

Category:Map Composer/Printing
Affected QGIS version:3.3(master) Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:duplicate
Crashes QGIS or corrupts data:No Copied to github as #:27877


If multiple map themes are created using different styles for the 1 layer, and Print Layouts are created using the "follow map theme" option, the Legend incorrectly shows styles as per the theme currently being displayed in the Map Composer, not as per the Map Theme chosen in the print layout. This glitch can be overcome by selecting the appropriate Map Theme in the Map Composer each time a Print Layout is to be exported, however, it prevents the use of automated Print Exports for multiple layouts, and introduces significant chances of error by forgetting to update the Map Composer every time.

For example -
See attached images, where I have saved 2 Map Themes... "No Style" and "Categorised".
I then create a Print Layout and set it to follow Map Theme "Categorised". While the Map Composer is showing the same theme, the legend displays correctly. However, if the Map Composer is switched to a different Map Theme, the Legend in the Print Composer no longer reflects what is being shown in the print layout, and instead reflects the Map Theme of the Print Composer.

MapTheme1_NoStyle.jpg (144 KB) Jamie Sheehan, 2018-10-09 07:15 AM

MapTheme2_Categorised.jpg (193 KB) Jamie Sheehan, 2018-10-09 07:15 AM

PrintLayout_LegendShowingMapThemeNoStyle.jpg (107 KB) Jamie Sheehan, 2018-10-09 07:15 AM

PrintLayout_MapThemeCategorised.jpg (132 KB) Jamie Sheehan, 2018-10-09 07:15 AM

Related issues

Related to QGIS Application - Bug report #16795: [Composer Legend] Symbology of layer always follows the m... Open 2017-07-05


#1 Updated by Harrissou Santanna almost 4 years ago

  • Related to Bug report #16795: [Composer Legend] Symbology of layer always follows the map canvas and breaks the composer legend added

#2 Updated by Saber Razmjooei almost 4 years ago

  • Operating System deleted (Windows)
  • Affected QGIS version changed from 3.2.3 to 3.3(master)

#3 Updated by Nyall Dawson almost 4 years ago

  • Resolution set to duplicate
  • Status changed from Open to Closed

Duplicate of #16795

Also available in: Atom PDF