Skip to content
Permalink
Browse files
fix SVG selector widget not reacting to changes
fixes #43802
  • Loading branch information
3nids authored and nyalldawson committed Jun 29, 2021
1 parent 928a170 commit 3bfdd756406801c7307b8aefae1c608f4b1c6949
Showing with 5 additions and 2 deletions.
  1. +3 −2 src/gui/layout/qgslayoutpicturewidget.cpp
  2. +2 −0 src/gui/symbology/qgssvgselectorwidget.cpp
@@ -71,7 +71,8 @@ QgsLayoutPictureWidget::QgsLayoutPictureWidget( QgsLayoutItemPicture *picture )
connect( mStrokeWidthSpinBox, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsLayoutPictureWidget::mStrokeWidthSpinBox_valueChanged );
connect( mPictureRotationOffsetSpinBox, static_cast < void ( QDoubleSpinBox::* )( double ) > ( &QDoubleSpinBox::valueChanged ), this, &QgsLayoutPictureWidget::mPictureRotationOffsetSpinBox_valueChanged );
connect( mNorthTypeComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsLayoutPictureWidget::mNorthTypeComboBox_currentIndexChanged );
connect( mSvgSelectorWidget->sourceLineEdit(), &QgsSvgSourceLineEdit::sourceChanged, this, &QgsLayoutPictureWidget::sourceChanged );
connect( mSvgSelectorWidget, &QgsSvgSelectorWidget::svgSelected, this, &QgsLayoutPictureWidget::sourceChanged );

connect( mSvgSelectorWidget, &QgsSvgSelectorWidget::svgParametersChanged, this, &QgsLayoutPictureWidget::setSvgDynamicParameters );
connect( mRadioSVG, &QRadioButton::toggled, this, &QgsLayoutPictureWidget::modeChanged );
connect( mRadioRaster, &QRadioButton::toggled, this, &QgsLayoutPictureWidget::modeChanged );
@@ -472,7 +473,7 @@ void QgsLayoutPictureWidget::sourceChanged( const QString &source )
if ( mPicture )
{
mPicture->beginCommand( tr( "Change Picture" ) );
mPicture->setPicturePath( source, QgsLayoutItemPicture::FormatSVG );
mPicture->setPicturePath( source );
mPicture->update();
mPicture->endCommand();
updateSvgParamGui();
@@ -433,6 +433,8 @@ QgsSvgSelectorWidget::QgsSvgSelectorWidget( QWidget *parent )
if ( selectedRows.count() > 0 )
mParametersModel->removeParameters( selectedRows );
} );

connect( mSourceLineEdit, &QgsPictureSourceLineEditBase::sourceChanged, this, &QgsSvgSelectorWidget::svgSelected );
}

void QgsSvgSelectorWidget::initParametersModel( const QgsExpressionContextGenerator *generator, QgsVectorLayer *layer )

0 comments on commit 3bfdd75

Please sign in to comment.