Skip to content

Commit 3749e03

Browse files
committed
Check if legend name starts with an + sign to fix #1280
1 parent 6a8b3f0 commit 3749e03

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)