Skip to content

Commit

Permalink
Correctly set SVG/Raster mode when clicking an existing (#44745)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicogodet committed Aug 25, 2021
1 parent 19129f7 commit 4444402
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 4444402

Please sign in to comment.