Skip to content

Commit 0db065c

Browse files
committed
Merge pr #1281 from @dmolineus
This fixes a bug in legend handling when legends are extended.
2 parents 97395cf + 3749e03 commit 0db065c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/CoreBundle/EventListener/DcGeneral/Table/AbstractPaletteRestrictionListener.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
*
1313
* @package MetaModels/core
1414
* @author Christian Schiffler <c.schiffler@cyberspectrum.de>
15+
* @author David Molineus <david.molineus@netzmacht.de>
1516
* @copyright 2012-2019 The MetaModels team.
1617
* @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later
1718
* @filesource
@@ -47,6 +48,10 @@ class AbstractPaletteRestrictionListener
4748
*/
4849
protected function getLegend($name, $palette, $prevLegend = null)
4950
{
51+
if (strpos($name, '+') === 0) {
52+
$name = substr($name, 1);
53+
}
54+
5055
if (!$palette->hasLegend($name)) {
5156
$palette->addLegend(new Legend($name), $prevLegend);
5257
}

0 commit comments

Comments
 (0)