mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
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
This commit is contained in:
parent
697ef5580e
commit
e43fe56ecd
@ -508,6 +508,7 @@ QgsSVGFillSymbolLayerWidget::QgsSVGFillSymbolLayerWidget( QWidget* parent ): Qgs
|
|||||||
mLayer = 0;
|
mLayer = 0;
|
||||||
setupUi( this );
|
setupUi( this );
|
||||||
insertIcons();
|
insertIcons();
|
||||||
|
updateOutlineIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QgsSVGFillSymbolLayerWidget::setSymbolLayer( QgsSymbolLayerV2* layer )
|
void QgsSVGFillSymbolLayerWidget::setSymbolLayer( QgsSymbolLayerV2* layer )
|
||||||
@ -529,6 +530,7 @@ void QgsSVGFillSymbolLayerWidget::setSymbolLayer( QgsSymbolLayerV2* layer )
|
|||||||
mTextureWidthSpinBox->setValue( width );
|
mTextureWidthSpinBox->setValue( width );
|
||||||
mSVGLineEdit->setText( mLayer->svgFilePath() );
|
mSVGLineEdit->setText( mLayer->svgFilePath() );
|
||||||
}
|
}
|
||||||
|
updateOutlineIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
QgsSymbolLayerV2* QgsSVGFillSymbolLayerWidget::symbolLayer()
|
QgsSymbolLayerV2* QgsSVGFillSymbolLayerWidget::symbolLayer()
|
||||||
@ -604,10 +606,20 @@ void QgsSVGFillSymbolLayerWidget::insertIcons()
|
|||||||
void QgsSVGFillSymbolLayerWidget::on_mChangeOutlinePushButton_clicked()
|
void QgsSVGFillSymbolLayerWidget::on_mChangeOutlinePushButton_clicked()
|
||||||
{
|
{
|
||||||
QgsSymbolV2PropertiesDialog dlg( mLayer->subSymbol(), this );
|
QgsSymbolV2PropertiesDialog dlg( mLayer->subSymbol(), this );
|
||||||
if ( dlg.exec() == 0 )
|
if ( dlg.exec() == QDialog::Rejected )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateOutlineIcon();
|
||||||
emit changed();
|
emit changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QgsSVGFillSymbolLayerWidget::updateOutlineIcon()
|
||||||
|
{
|
||||||
|
if ( mLayer )
|
||||||
|
{
|
||||||
|
QIcon icon = QgsSymbolLayerV2Utils::symbolPreviewIcon( mLayer->subSymbol(), mChangeOutlinePushButton->iconSize() );
|
||||||
|
mChangeOutlinePushButton->setIcon( icon );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -230,6 +230,7 @@ class GUI_EXPORT QgsSVGFillSymbolLayerWidget : public QgsSymbolLayerV2Widget, pr
|
|||||||
//sets new output unit. Is called on combo box or spin box change
|
//sets new output unit. Is called on combo box or spin box change
|
||||||
void setOutputUnit();
|
void setOutputUnit();
|
||||||
void insertIcons();
|
void insertIcons();
|
||||||
|
void updateOutlineIcon();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_mBrowseToolButton_clicked();
|
void on_mBrowseToolButton_clicked();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user