Skip to content
Permalink
Browse files
Correctly set SVG/Raster mode when clicking an existing (#44745)
  • Loading branch information
nicogodet committed Aug 25, 2021
1 parent 19129f7 commit 44444022142ddfd812a94248728ea355b8e1dfbe
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 4444402

Please sign in to comment.