Skip to content
Permalink
Browse files

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

This doesn't work, and doesn't make sense
  • Loading branch information
nyalldawson committed Nov 21, 2020
1 parent cfc5b37 commit 1b5682579139d37a3ee5b39bbe331ae06a7cee10
Showing with 18 additions and 0 deletions.
  1. +18 −0 src/gui/layout/qgslayoutlegendwidget.cpp
@@ -1574,6 +1574,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 1b56825

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