diff --git a/src/gui/symbology-ng/qgssymbollayerv2widget.cpp b/src/gui/symbology-ng/qgssymbollayerv2widget.cpp index af39fa4bc03..226d7eb18ad 100644 --- a/src/gui/symbology-ng/qgssymbollayerv2widget.cpp +++ b/src/gui/symbology-ng/qgssymbollayerv2widget.cpp @@ -508,6 +508,7 @@ QgsSVGFillSymbolLayerWidget::QgsSVGFillSymbolLayerWidget( QWidget* parent ): Qgs mLayer = 0; setupUi( this ); insertIcons(); + updateOutlineIcon(); } void QgsSVGFillSymbolLayerWidget::setSymbolLayer( QgsSymbolLayerV2* layer ) @@ -529,6 +530,7 @@ void QgsSVGFillSymbolLayerWidget::setSymbolLayer( QgsSymbolLayerV2* layer ) mTextureWidthSpinBox->setValue( width ); mSVGLineEdit->setText( mLayer->svgFilePath() ); } + updateOutlineIcon(); } QgsSymbolLayerV2* QgsSVGFillSymbolLayerWidget::symbolLayer() @@ -604,10 +606,20 @@ void QgsSVGFillSymbolLayerWidget::insertIcons() void QgsSVGFillSymbolLayerWidget::on_mChangeOutlinePushButton_clicked() { QgsSymbolV2PropertiesDialog dlg( mLayer->subSymbol(), this ); - if ( dlg.exec() == 0 ) + if ( dlg.exec() == QDialog::Rejected ) { return; } + updateOutlineIcon(); emit changed(); } + +void QgsSVGFillSymbolLayerWidget::updateOutlineIcon() +{ + if ( mLayer ) + { + QIcon icon = QgsSymbolLayerV2Utils::symbolPreviewIcon( mLayer->subSymbol(), mChangeOutlinePushButton->iconSize() ); + mChangeOutlinePushButton->setIcon( icon ); + } +} diff --git a/src/gui/symbology-ng/qgssymbollayerv2widget.h b/src/gui/symbology-ng/qgssymbollayerv2widget.h index 0b0c7bd4ed5..b74a7180d11 100644 --- a/src/gui/symbology-ng/qgssymbollayerv2widget.h +++ b/src/gui/symbology-ng/qgssymbollayerv2widget.h @@ -230,6 +230,7 @@ class GUI_EXPORT QgsSVGFillSymbolLayerWidget : public QgsSymbolLayerV2Widget, pr //sets new output unit. Is called on combo box or spin box change void setOutputUnit(); void insertIcons(); + void updateOutlineIcon(); private slots: void on_mBrowseToolButton_clicked();