File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -194,12 +194,13 @@ void QgsSimpleLineSymbolLayer::startRender( QgsSymbolRenderContext &context )
194194 mPen .setColor ( penColor );
195195 double scaledWidth = context.renderContext ().convertToPainterUnits ( mWidth , mWidthUnit , mWidthMapUnitScale );
196196 mPen .setWidthF ( scaledWidth );
197- if ( mUseCustomDashPattern && ! qgsDoubleNear ( scaledWidth, 0 ) )
197+ if ( mUseCustomDashPattern )
198198 {
199199 mPen .setStyle ( Qt::CustomDashLine );
200200
201201 // scale pattern vector
202- double dashWidthDiv = scaledWidth;
202+ double dashWidthDiv = qgsDoubleNear ( scaledWidth, 0 ) ? 1.0 : scaledWidth;
203+
203204 // fix dash pattern width in Qt 4.8
204205 QStringList versionSplit = QString ( qVersion () ).split ( ' .' );
205206 if ( versionSplit.size () > 1
You can’t perform that action at this time.
0 commit comments