https://issues.qgis.org/https://issues.qgis.org/favicon.ico2017-07-15T10:54:38ZQGIS Issue TrackingQGIS Application - Bug report #16866: RenderUnit::RenderMetersInMapUnits: no preview Image in Symbology-Dialoghttps://issues.qgis.org/issues/16866?journal_id=809262017-07-15T10:54:38ZMark Johnsonmj10777@googlemail.com
<ul><li><strong>File</strong> <a href="/attachments/download/11180/updatePreview.all.Original.png">updatePreview.all.Original.png</a> added</li></ul><p>This problem seems to be caused by a (possibly) logical error in <strong>QgsSymbol::bigSymbolPreviewImage</strong></p>
<p>The QgsUnitTypes::RenderUnit of the Layer is being used instead of QgsUnitTypes::RenderMillimeters.</p>
<p><img src="https://issues.qgis.org/attachments/download/11180/updatePreview.all.Original.png" alt="" /></p>
<p>The QgsDistanceArea being used is <strong>not</strong> based on the Layer being used.</p>
<p>Thus when this runs, MapUnits are assumed to be in Degrees, RenderMetersInMapUnits (a value given in Meters) is transformed into degrees. So for the given 5.1 Meters: 0.00000458141 is bing used - which cannot be seen.</p>
<p>This seems to also to effect Icons being shown for the 'Simple marker' and in the Layer Panel.</p>
<p>For QgsSymbol::bigSymbolPreviewImage, this is simple to resolve<br />- save the OutputUnit of the class (which renderPolyline, renderPolygon and renderPoint use)<br />- setOutputUnit( QgsUnitTypes::RenderMillimeters); <br />- restore the original value of the OutputUnit.</p>
<p>I was hoping to do the same for <strong>QgsSymbol::drawPreviewIcon</strong>, but that did not work.<br />- so this problem is still open.</p>
<p>A pull request is being made for the first solution with a reference to this issue.</p> QGIS Application - Bug report #16866: RenderUnit::RenderMetersInMapUnits: no preview Image in Symbology-Dialoghttps://issues.qgis.org/issues/16866?journal_id=1026602019-03-09T15:28:11ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Feedback</i></li></ul><p>Please check if this issue is still valid on QGIS 3.4.5 or 3.6.</p>