1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-11-21 20:45:10 +00:00

Merge pull request #1736 from travkin79/patch/1735

Fix #1735 - Fix hiding some of multiple stereotypes in clusters (rectangles, packages, etc.)
This commit is contained in:
PlantUML 2024-04-11 22:43:19 +02:00 committed by GitHub
commit 3adf9c93c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -160,8 +160,8 @@ public final class ClusterHeader {
if (stereos == null) if (stereos == null)
return TextBlockUtils.empty(0, 0); return TextBlockUtils.empty(0, 0);
final boolean show = portionShower.showPortion(EntityPortion.STEREOTYPE, g); final List<String> visibleStereotypes = portionShower.getVisibleStereotypeLabels(g);
if (show == false) if (visibleStereotypes == null || visibleStereotypes.isEmpty())
return TextBlockUtils.empty(0, 0); return TextBlockUtils.empty(0, 0);
final Style style = Cluster final Style style = Cluster
@ -169,7 +169,7 @@ public final class ClusterHeader {
.forStereotypeItself(g.getStereotype()).getMergedStyle(skinParam.getCurrentStyleBuilder()); .forStereotypeItself(g.getStereotype()).getMergedStyle(skinParam.getCurrentStyleBuilder());
final FontConfiguration fontConfiguration = style.getFontConfiguration(skinParam.getIHtmlColorSet()); final FontConfiguration fontConfiguration = style.getFontConfiguration(skinParam.getIHtmlColorSet());
return Display.create(stereos).create(fontConfiguration, HorizontalAlignment.CENTER, skinParam); return Display.create(visibleStereotypes).create(fontConfiguration, HorizontalAlignment.CENTER, skinParam);
} }