Skip to content

Commit

Permalink
Merge pull request #46976 from alexbruy/dd-params-picture
Browse files Browse the repository at this point in the history
Disable data-defined buttons for incompatible SVG pictures in Layout item (fix #26524)
  • Loading branch information
alexbruy committed Jan 25, 2022
2 parents 159a3e9 + 8e35fff commit 322be66
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gui/layout/qgslayoutpicturewidget.cpp
Expand Up @@ -383,6 +383,7 @@ void QgsLayoutPictureWidget::updateSvgParamGui( bool resetValues )
mFillColorButton->setColor( fill );
}
mFillColorButton->setEnabled( hasFillParam );
mFillColorDDBtn->setEnabled( hasFillParam );
mFillColorButton->setAllowOpacity( hasFillOpacityParam );
if ( resetValues )
{
Expand All @@ -396,12 +397,14 @@ void QgsLayoutPictureWidget::updateSvgParamGui( bool resetValues )
mStrokeColorButton->setColor( stroke );
}
mStrokeColorButton->setEnabled( hasStrokeParam );
mStrokeColorDDBtn->setEnabled( hasStrokeParam );
mStrokeColorButton->setAllowOpacity( hasStrokeOpacityParam );
if ( hasDefaultStrokeWidth && resetValues )
{
mStrokeWidthSpinBox->setValue( defaultStrokeWidth );
}
mStrokeWidthSpinBox->setEnabled( hasStrokeWidthParam );
mStrokeWidthDDBtn->setEnabled( hasStrokeWidthParam );
}

void QgsLayoutPictureWidget::mFillColorButton_colorChanged( const QColor &color )
Expand Down

0 comments on commit 322be66

Please sign in to comment.