Skip to content

Commit

Permalink
[ogr] Fix simple markers' stroke width of embedded styling
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Apr 23, 2023
1 parent 4baab6d commit a8eb21d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/core/qgsogrutils.cpp
Expand Up @@ -1654,6 +1654,8 @@ std::unique_ptr<QgsSymbol> QgsOgrUtils::symbolFromStyleString( const QString &st

std::unique_ptr< QgsSimpleMarkerSymbolLayer > simpleMarker = std::make_unique< QgsSimpleMarkerSymbolLayer >( shape, symbolSize, -angle );
simpleMarker->setSizeUnit( symbolSizeUnit );
simpleMarker->setStrokeWidth( 1.0 );
simpleMarker->setStrokeWidthUnit( Qgis::RenderUnit::Points );

if ( isFilled && QgsSimpleMarkerSymbolLayer::shapeIsFilled( shape ) )
{
Expand Down
3 changes: 2 additions & 1 deletion src/core/symbology/qgsmapinfosymbolconverter.cpp
Expand Up @@ -1517,6 +1517,8 @@ QgsMarkerSymbol *QgsMapInfoSymbolConverter::convertMarkerSymbol( int identifier,
simpleMarker->setSizeUnit( sizeUnit );
simpleMarker->setAngle( angle );
simpleMarker->setVerticalAnchorPoint( vertAlign );
simpleMarker->setStrokeWidth( 1.0 );
simpleMarker->setStrokeWidthUnit( Qgis::RenderUnit::Points );

if ( isNull )
{
Expand All @@ -1527,7 +1529,6 @@ QgsMarkerSymbol *QgsMapInfoSymbolConverter::convertMarkerSymbol( int identifier,
{
simpleMarker->setColor( color );
simpleMarker->setStrokeColor( QColor( 0, 0, 0 ) );
simpleMarker->setStrokeWidth( 0 );
}
else
{
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a8eb21d

Please sign in to comment.