Remove orphan chapter if empty

This commit is contained in:
2020-02-03 16:13:17 +00:00
parent 1f722f5df3
commit c67e6d6abc

View File

@@ -4193,6 +4193,9 @@ public class AudiobookRecorder extends JFrame implements DocumentListener {
} }
} }
} }
if (orphans.getChildCount() == 0) {
bookTreeModel.removeNodeFromParent(orphans);
}
} }
public Chapter getChapterById(String id) { public Chapter getChapterById(String id) {