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

Fix #1735 - Only hide the stereotype text block if it does not contain visible stereotypes

This commit is contained in:
Dietrich Travkin 2024-04-11 17:21:35 +02:00
parent 9f53546ff6
commit 46ac4a391f

View File

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