Skip to content

Commit e43fe56

Browse files
author
mhugent
committedJan 16, 2010
Display polygon outline icon on button for svg fill symbol layer
git-svn-id: http://svn.osgeo.org/qgis/trunk@12778 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 697ef55 commit e43fe56

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed
 

‎src/gui/symbology-ng/qgssymbollayerv2widget.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,7 @@ QgsSVGFillSymbolLayerWidget::QgsSVGFillSymbolLayerWidget( QWidget* parent ): Qgs
508508
mLayer = 0;
509509
setupUi( this );
510510
insertIcons();
511+
updateOutlineIcon();
511512
}
512513

513514
void QgsSVGFillSymbolLayerWidget::setSymbolLayer( QgsSymbolLayerV2* layer )
@@ -529,6 +530,7 @@ void QgsSVGFillSymbolLayerWidget::setSymbolLayer( QgsSymbolLayerV2* layer )
529530
mTextureWidthSpinBox->setValue( width );
530531
mSVGLineEdit->setText( mLayer->svgFilePath() );
531532
}
533+
updateOutlineIcon();
532534
}
533535

534536
QgsSymbolLayerV2* QgsSVGFillSymbolLayerWidget::symbolLayer()
@@ -604,10 +606,20 @@ void QgsSVGFillSymbolLayerWidget::insertIcons()
604606
void QgsSVGFillSymbolLayerWidget::on_mChangeOutlinePushButton_clicked()
605607
{
606608
QgsSymbolV2PropertiesDialog dlg( mLayer->subSymbol(), this );
607-
if ( dlg.exec() == 0 )
609+
if ( dlg.exec() == QDialog::Rejected )
608610
{
609611
return;
610612
}
611613

614+
updateOutlineIcon();
612615
emit changed();
613616
}
617+
618+
void QgsSVGFillSymbolLayerWidget::updateOutlineIcon()
619+
{
620+
if ( mLayer )
621+
{
622+
QIcon icon = QgsSymbolLayerV2Utils::symbolPreviewIcon( mLayer->subSymbol(), mChangeOutlinePushButton->iconSize() );
623+
mChangeOutlinePushButton->setIcon( icon );
624+
}
625+
}

‎src/gui/symbology-ng/qgssymbollayerv2widget.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ class GUI_EXPORT QgsSVGFillSymbolLayerWidget : public QgsSymbolLayerV2Widget, pr
230230
//sets new output unit. Is called on combo box or spin box change
231231
void setOutputUnit();
232232
void insertIcons();
233+
void updateOutlineIcon();
233234

234235
private slots:
235236
void on_mBrowseToolButton_clicked();

0 commit comments

Comments
 (0)
Please sign in to comment.