Bug report #10217
Regression: line marker symbology misaligned when (composer) exported on two layers using same dataset & symbology settings
|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|
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.
#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 (
#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 :)
#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() ?