Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't show option to customise legend patch symbol for raster nodes
  • Loading branch information
github-actions[bot] authored and nyalldawson committed Nov 22, 2020
1 parent 2fe28dd commit 84b9cbf
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/gui/layout/qgslayoutlegendwidget.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit 84b9cbf

Please sign in to comment.