[DSL generator] Avoid injecting the state pattern in label if already present in stateDescription metadata (#4730)

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
pull/4746/head
lolodomo 2025-04-23 18:49:17 +02:00 committed by GitHub
parent 9741434f61
commit 2a4b0735fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -185,6 +185,10 @@ public class DslItemFileConverter extends AbstractItemFileGenerator {
if (!(statePattern != null && binding.getProperties().size() == 1
&& (patternInjected || statePattern.equals(defaultPattern)))) {
model.getBindings().add(binding);
// Avoid injecting the state pattern in label if already present in stateDescription metadata
if (patternInjected && statePattern != null) {
model.setLabel(label);
}
}
}