Skip to content

Commit

Permalink
Don't show option to customise legend patch symbol for raster nodes
Browse files Browse the repository at this point in the history
This doesn't work, and doesn't make sense
  • Loading branch information
nyalldawson committed Nov 21, 2020
1 parent cfc5b37 commit 1b56825
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/gui/layout/qgslayoutlegendwidget.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit 1b56825

Please sign in to comment.