Bug report #10217

Regression: line marker symbology misaligned when (composer) exported on two layers using same dataset & symbology settings

Added by Mathieu Pellerin - nIRV over 6 years ago. Updated over 6 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:Martin Dobias
Category:Symbology
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:18663

Description

Under QGIS master, line marker symbology on two layers using the same data source (i.e. same shapefile) and symbology settings will not render properly when exported via the QGIS composer and lead to visual misalignment of the two layers' markers. It must have something to do with DPI value not being taken into account as the symbology of the two layers render just fine on QGIS' main canvas.

I've attached two screenshots that (hopefully) show the problem better than the above description.

Steps to reproduce:
1. Open the line_markers-broken project (attached as line_markers-broken.zip to this issue)
2. Notice how the dot markers on both layers overlap each other perfectly (as it should since it uses the same line marker settings)
3. Open the Composer 1, and export it to an image (make sure you keep the default 300 dpi)
4. Open the exported image, and notice the dot markers go misaligned on parts of the styled polygons.

It's a subtle yet visually disturbing regression.

line_markers-broken.zip (380 KB) Mathieu Pellerin - nIRV, 2014-05-08 07:41 PM

nyall_markers_ok-QGIS_22.png (44 KB) Mathieu Pellerin - nIRV, 2014-05-08 07:41 PM

nyall_markers_mess-QGIS-master.png (58.6 KB) Mathieu Pellerin - nIRV, 2014-05-08 07:41 PM

Associated revisions

Revision dac4cfc2
Added by Martin Dobias over 6 years ago

Fix #10217 (misaligned markers in composer)

History

#1 Updated by Martin Dobias over 6 years ago

  • Assignee deleted (Martin Dobias)

Actually it is caused by simplification - with simplification disabled the markers align perfectly.

#2 Updated by Martin Dobias over 6 years ago

  • Subject changed from MTR regression: line marker symbology misaligned when (composer) exported on two layers using same dataset & symbology settings to Regression: line marker symbology misaligned when (composer) exported on two layers using same dataset & symbology settings
  • Tag deleted (MTR)

#3 Updated by Mathieu Pellerin - nIRV over 6 years ago

Martin, I'm perplexed. Isn't simplification only used in qgis' main canvas & disabled when exporting to images via the composer? If so, why would simplification affect line markers in an exported composer?

Also, simplification was introduced in 2.2 and the regression isn't present on that version. Mind you there has been code refactoring of that feature since then.

Confused I am :)

#4 Updated by Giovanni Manghi over 6 years ago

  • Assignee set to Alvaro Huarte

#5 Updated by Alvaro Huarte over 6 years ago

Hi, I reproduce this issue when the composer draw the map too.

Currently simplification is enabled in composer (https://github.com/qgis/QGIS/blob/master/src/core/composer/qgscomposermap.cpp#L199). There is code pending to uncomment after the MultiThread rendering was merged.

But it is strange, the simplification of the geometries uses the current DPI value to work (https://github.com/qgis/QGIS/blob/master/src/core/qgsvectorlayerrenderer.cpp#L124), the values of logicalDpiX/logicalDpiY for each layer are distincts.

Maybe QgsMapSettings is not properly assigned in QgsComposerMap::cache() ?

#6 Updated by Mathieu Pellerin - nIRV over 6 years ago

Is the plan for disabling of simplification upon export to return before the release of 2.4? That'd be important.

That said, if an underlying issue was discovered, that should be fixed :)

#7 Updated by Martin Dobias over 6 years ago

  • Assignee changed from Alvaro Huarte to Martin Dobias

Actually I see where the problem is - DPI should not be involved in comupation anymore. I will commit a patch soon

#8 Updated by Mathieu Pellerin - nIRV over 6 years ago

Great.

Martin, Alvaro, should I file an issue to re-introduce the deactivation of simplification when exporting from the composer? It's a rather important thing that'll need addressing.

#9 Updated by Martin Dobias over 6 years ago

Mathieu - yeah please start a new issue on that matter

#10 Updated by Martin Dobias over 6 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF