Skip to content

Commit 53fd7f3

Browse files
tqhienmhugent
authored andcommitted
Fix Blocker Issue #7871 : SVG Marker fill and outlin colors are restored
when changing widget or reopening style window
1 parent 26efcbc commit 53fd7f3

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

src/gui/symbology-ng/qgssymbollayerv2widget.cpp

+20-2
Original file line numberDiff line numberDiff line change
@@ -905,9 +905,27 @@ void QgsSvgMarkerSymbolLayerV2Widget::setGuiForSvg( const QgsSvgMarkerSymbolLaye
905905
mBorderWidthSpinBox->setEnabled( hasOutlineWidthParam );
906906

907907
if ( hasFillParam )
908-
mChangeColorButton->setColor( defaultFill );
908+
{
909+
if ( layer->fillColor().isValid() )
910+
{
911+
mChangeColorButton->setColor( layer->fillColor() );
912+
}
913+
else
914+
{
915+
mChangeColorButton->setColor( defaultFill );
916+
}
917+
}
909918
if ( hasOutlineParam )
910-
mChangeBorderColorButton->setColor( defaultOutline );
919+
{
920+
if ( layer->outlineColor().isValid() )
921+
{
922+
mChangeBorderColorButton->setColor( layer->outlineColor() );
923+
}
924+
else
925+
{
926+
mChangeBorderColorButton->setColor( defaultOutline );
927+
}
928+
}
911929

912930
mFileLineEdit->blockSignals( true );
913931
mFileLineEdit->setText( layer->path() );

0 commit comments

Comments
 (0)