Bug report #15728
line pattern fill symbology throws qpainter warnings when line space in map unit and canvas scaled out
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Mathieu Pellerin - nIRV | ||
Category: | Symbology | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | Yes | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 23650 |
Description
When the line pattern fill symbology uses map unit line spacing value and the scale forces the line spacing to effectively disappear, the symbology fails to render, and the following QPainter warnings are printed in the terminal:
Warning: QPainter::begin: Paint device returned engine == 0, type: 3 Warning: QPainter::setRenderHint: Painter must be active to set rendering hints Warning: QPainter::setPen: Painter not active Warning: QPainter::setBrush: Painter not active Warning: QPainter::drawPath: Painter not active Warning: QPainter::setPen: Painter not active Warning: QPainter::setBrush: Painter not active Warning: QPainter::drawPath: Painter not active Warning: QPainter::end: Painter not active, abortedSteps to reproduce
- Launch QGIS within a terminal to be able to see messages output there
- Open the attached test project (qpainter_warnings.qgs)
- Gradually zoom out the canvas, until you see the line pattern fill fail to render
- Go to the terminal window, you'll see the QPainter warning
Associated revisions
[symbology] prevent creation of a zero width/height line pattern image (fixes #15728)
History
#1 Updated by Mathieu Pellerin - nIRV almost 8 years ago
- Pull Request or Patch supplied changed from No to Yes
- Assignee set to Mathieu Pellerin - nIRV
PR submitted (https://github.com/qgis/QGIS/pull/3645).
#2 Updated by Nyall Dawson almost 8 years ago
- Status changed from Open to Closed
Fixed in changeset 3bdc77d3daa4257c926932204ff4a9340084788a.