Skip to content
Permalink
Browse files

Don't show option to customise legend patch symbol for raster nodes

  • Loading branch information
github-actions authored and nyalldawson committed Nov 22, 2020
1 parent 2fe28dd commit 84b9cbf74aaca32ff5f53747ac750efbde39ea68
Showing with 18 additions and 0 deletions.
  1. +18 −0 src/gui/layout/qgslayoutlegendwidget.cpp
@@ -1570,6 +1570,24 @@ QgsLayoutLegendNodeWidget::QgsLayoutLegendNodeWidget( QgsLayoutItemLegend *legen
mPatchShapeButton->hide();
}

if ( mLegendNode )
{
switch ( static_cast< QgsLayerTreeModelLegendNode::NodeTypes >( mLegendNode->data( QgsLayerTreeModelLegendNode::NodeTypeRole ).toInt() ) )
{
case QgsLayerTreeModelLegendNode::EmbeddedWidget:
case QgsLayerTreeModelLegendNode::RasterSymbolLegend:
case QgsLayerTreeModelLegendNode::ImageLegend:
case QgsLayerTreeModelLegendNode::WmsLegend:
case QgsLayerTreeModelLegendNode::DataDefinedSizeLegend:
mCustomSymbolCheckBox->hide();
break;

case QgsLayerTreeModelLegendNode::SimpleLegend:
case QgsLayerTreeModelLegendNode::SymbolLegend:
break;
}
}

mLabelEdit->setPlainText( currentLabel );
connect( mLabelEdit, &QPlainTextEdit::textChanged, this, &QgsLayoutLegendNodeWidget::labelChanged );
connect( mPatchShapeButton, &QgsLegendPatchShapeButton::changed, this, &QgsLayoutLegendNodeWidget::patchChanged );

0 comments on commit 84b9cbf

Please sign in to comment.
You can’t perform that action at this time.