Skip to content
Permalink
Browse files
Merge pull request #44837 from qgis/backport-44745-to-release-3_20
[Backport release-3_20] Correctly set SVG/Raster mode when clicking an existing
  • Loading branch information
rouault committed Aug 31, 2021
2 parents 0d1db8c + 66e5a2c commit ee36b0ede69175131a1f0bd877679bfae6e34ecf
Showing with 11 additions and 11 deletions.
  1. +11 −11 src/gui/layout/qgslayoutpicturewidget.cpp
@@ -111,17 +111,6 @@ QgsLayoutPictureWidget::QgsLayoutPictureWidget( QgsLayoutItemPicture *picture )

setGuiElementValues();

switch ( mPicture->mode() )
{
case QgsLayoutItemPicture::FormatSVG:
case QgsLayoutItemPicture::FormatUnknown:
mRadioSVG->setChecked( true );
break;
case QgsLayoutItemPicture::FormatRaster:
mRadioRaster->setChecked( true );
break;
}

connect( mPicture, &QgsLayoutObject::changed, this, &QgsLayoutPictureWidget::setGuiElementValues );
connect( mPicture, &QgsLayoutItemPicture::pictureRotationChanged, this, &QgsLayoutPictureWidget::setPicRotationSpinValue );

@@ -330,6 +319,17 @@ void QgsLayoutPictureWidget::setGuiElementValues()
mAnchorPointComboBox->setEnabled( false );
}

switch ( mPicture->mode() )
{
case QgsLayoutItemPicture::FormatSVG:
case QgsLayoutItemPicture::FormatUnknown:
mRadioSVG->setChecked( true );
break;
case QgsLayoutItemPicture::FormatRaster:
mRadioRaster->setChecked( true );
break;
}

mSvgSelectorWidget->setSvgPath( mPicture->picturePath() );
mSvgSelectorWidget->setSvgParameters( mPicture->svgDynamicParameters() );

0 comments on commit ee36b0e

Please sign in to comment.