Skip to content

Commit 699fa93

Browse files
committedApr 22, 2023
[ogr] Fix simple markers' stroke width of embedded styling
1 parent 30870df commit 699fa93

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed
 

‎src/core/qgsogrutils.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1654,6 +1654,8 @@ std::unique_ptr<QgsSymbol> QgsOgrUtils::symbolFromStyleString( const QString &st
16541654

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

16581660
if ( isFilled && QgsSimpleMarkerSymbolLayer::shapeIsFilled( shape ) )
16591661
{

‎src/core/symbology/qgsmapinfosymbolconverter.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1517,6 +1517,8 @@ QgsMarkerSymbol *QgsMapInfoSymbolConverter::convertMarkerSymbol( int identifier,
15171517
simpleMarker->setSizeUnit( sizeUnit );
15181518
simpleMarker->setAngle( angle );
15191519
simpleMarker->setVerticalAnchorPoint( vertAlign );
1520+
simpleMarker->setStrokeWidth( 1.0 );
1521+
simpleMarker->setStrokeWidthUnit( Qgis::RenderUnit::Points );
15201522

15211523
if ( isNull )
15221524
{
@@ -1527,7 +1529,6 @@ QgsMarkerSymbol *QgsMapInfoSymbolConverter::convertMarkerSymbol( int identifier,
15271529
{
15281530
simpleMarker->setColor( color );
15291531
simpleMarker->setStrokeColor( QColor( 0, 0, 0 ) );
1530-
simpleMarker->setStrokeWidth( 0 );
15311532
}
15321533
else
15331534
{

0 commit comments

Comments
 (0)
Please sign in to comment.