mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Fix #7012
This commit is contained in:
parent
9c4c2150bf
commit
df0d690cd0
@ -326,11 +326,6 @@ QgsComposerLegend::Nucleon QgsComposerLegend::drawSymbolItem( QgsComposerLegendI
|
||||
#endif
|
||||
|
||||
QString text = symbolItem->text();
|
||||
if ( text.isEmpty() )
|
||||
{
|
||||
// Use layer label, used for single symbols
|
||||
text = layerItem->text();
|
||||
}
|
||||
|
||||
QStringList lines = splitStringForWrapping( text );
|
||||
|
||||
|
@ -170,6 +170,7 @@ int QgsLegendModel::addVectorLayerItemsV2( QStandardItem* layerItem, QgsVectorLa
|
||||
if ( oldSymbolItem )
|
||||
{
|
||||
currentSymbolItem->setUserText( oldSymbolItem->userText() );
|
||||
|
||||
}
|
||||
|
||||
currentSymbolItem->setFlags( Qt::ItemIsEnabled | Qt::ItemIsSelectable );
|
||||
@ -272,6 +273,11 @@ void QgsLegendModel::updateSymbolV2ItemText( QStandardItem* symbolItem )
|
||||
|
||||
QString label = sv2Item->userText().isEmpty() ? symbol.first : sv2Item->userText();
|
||||
|
||||
if ( renderer->type() == "singleSymbol" )
|
||||
{
|
||||
label = vLayer->name();
|
||||
}
|
||||
|
||||
if ( lItem->showFeatureCount() )
|
||||
{
|
||||
// Add counts to multi symbols layers only or labeled single symbols,
|
||||
|
Loading…
x
Reference in New Issue
Block a user