Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mhugent committed Jan 16, 2010
1 parent 697ef55 commit e43fe56
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/gui/symbology-ng/qgssymbollayerv2widget.cpp
Expand Up @@ -508,6 +508,7 @@ QgsSVGFillSymbolLayerWidget::QgsSVGFillSymbolLayerWidget( QWidget* parent ): Qgs
mLayer = 0;
setupUi( this );
insertIcons();
updateOutlineIcon();
}

void QgsSVGFillSymbolLayerWidget::setSymbolLayer( QgsSymbolLayerV2* layer )
Expand All @@ -529,6 +530,7 @@ void QgsSVGFillSymbolLayerWidget::setSymbolLayer( QgsSymbolLayerV2* layer )
mTextureWidthSpinBox->setValue( width );
mSVGLineEdit->setText( mLayer->svgFilePath() );
}
updateOutlineIcon();
}

QgsSymbolLayerV2* QgsSVGFillSymbolLayerWidget::symbolLayer()
Expand Down Expand Up @@ -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 );
}
}
1 change: 1 addition & 0 deletions src/gui/symbology-ng/qgssymbollayerv2widget.h
Expand Up @@ -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();
Expand Down

0 comments on commit e43fe56

Please sign in to comment.