diff --git a/src/uk/co/majenko/audiobookrecorder/AudiobookRecorder.java b/src/uk/co/majenko/audiobookrecorder/AudiobookRecorder.java index 828c9e2..ed8bc64 100644 --- a/src/uk/co/majenko/audiobookrecorder/AudiobookRecorder.java +++ b/src/uk/co/majenko/audiobookrecorder/AudiobookRecorder.java @@ -4193,6 +4193,9 @@ public class AudiobookRecorder extends JFrame implements DocumentListener { } } } + if (orphans.getChildCount() == 0) { + bookTreeModel.removeNodeFromParent(orphans); + } } public Chapter getChapterById(String id) {