Skip to content

Commit

Permalink
fix: no default outline text for empty topic in mind map
Browse files Browse the repository at this point in the history
  • Loading branch information
mindolph committed Nov 15, 2024
1 parent 8495147 commit 32a5477
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ private void refresh() {
});
}

/**
* Recursive load tree node.
*
* @param treeItem
* @param parentNode
*/
private void loadOutlineTreeNode(TreeItem<OutlineItemData> treeItem, Node parentNode) {
if (log.isTraceEnabled()) log.trace("Load items of a tree node to tree view node");
for (Node node : parentNode.getChildren()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ private void makeOutlinesRecursively(TopicNode rootTopic, Node rootNode) {
return;
}
for (TopicNode childTopic : rootTopic.getChildren()) {
String content = StringUtils.abbreviate(childTopic.getText(), 30);
String content = StringUtils.isNotBlank(childTopic.getText()) ? StringUtils.abbreviate(childTopic.getText(), 30)
: "[Empty Topic]";
MindMapAnchor mindMapAnchor = new MindMapAnchor();
mindMapAnchor.setText(childTopic.getText());
mindMapAnchor.setParentText(rootTopic.getText());
Expand Down

0 comments on commit 32a5477

Please sign in to comment.