Skip to content

Commit

Permalink
Merge pull request #44837 from qgis/backport-44745-to-release-3_20
Browse files Browse the repository at this point in the history
[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 ee36b0e
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/gui/layout/qgslayoutpicturewidget.cpp
Expand Up @@ -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 );

Expand Down Expand Up @@ -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() );

Expand Down

0 comments on commit ee36b0e

Please sign in to comment.