@Override
      public void contentAdded(@NotNull ContentManagerEvent event) {
        Content content = event.getContent();
        ContentManager manager = content.getManager();
        // merge subContents to main content if they are together inside one content manager
        if (manager != null && !(content instanceof SingleContentLayout.SubContent)) {
          List<Content> contents = manager.getContentsRecursively();
          List<Content> mainContents = contents.stream().filter(c -> !(c instanceof SingleContentLayout.SubContent)).toList();
          List<Content> subContents = contents.stream().filter(c -> c instanceof SingleContentLayout.SubContent).toList();
          if (mainContents.size() == 1) {
            Content mainContent = mainContents.get(0);
            JComponent component = mainContent.getComponent();
            SingleContentSupplier supplier = SingleContentSupplier.Companion.getSupplierFrom(component);
            if (supplier != null && supplier.getSubContents().containsAll(subContents)) {
              for (Content subContent : subContents) {
                ContentManager m = subContent.getManager();
                if (m != null) m.removeContent(subContent, false);
                ((SingleContentLayout.SubContent)subContent).getInfo().setHidden(false);
              }
            }
          }
        }

        getCurrentLayout().contentAdded(event);
        content.addPropertyChangeListener(propertyChangeListener);
        rebuild();

        if (window.isToHideOnEmptyContent()) {
          window.setAvailable(true);
        }
      }
@Override
      public void contentAdded(@NotNull ContentManagerEvent event)