Fixed loss of sentence settings on window resize

This commit is contained in:
2020-05-19 14:33:00 +01:00
parent 0e9ae7cc91
commit af31ba91a4
2 changed files with 7 additions and 0 deletions

View File

@@ -788,6 +788,10 @@ public class AudiobookRecorder extends JFrame implements DocumentListener {
DefaultMutableTreeNode n = (DefaultMutableTreeNode)bookTree.getLastSelectedPathComponent();
if (n == null) {
setSelectedSentence(null);
}
if (n instanceof BookTreeNode) {
BookTreeNode btn = (BookTreeNode)n;
btn.onSelect(btn);
@@ -3554,6 +3558,7 @@ public class AudiobookRecorder extends JFrame implements DocumentListener {
KVPair<String, String> de = defEff.getItemAt(i);
book.setDefaultEffect(de.getKey());
book.setTitle(tit);
book.setAuthor(aut);
book.setGenre(gen);
book.setComment(com);

View File

@@ -178,11 +178,13 @@ public class Book extends BookTreeNode {
return node.getTextContent();
}
public void setTitle(String n) { Debug.trace(); name = n; }
public void setAuthor(String a) { Debug.trace(); author = a; }
public void setGenre(String g) { Debug.trace(); genre = g; }
public void setComment(String c) { Debug.trace(); comment = c; }
public void setACX(String c) { Debug.trace(); ACX = c; }
public String getTitle() { Debug.trace(); return name; }
public String getAuthor() { Debug.trace(); return author; }
public String getGenre() { Debug.trace(); return genre; }
public String getComment() { Debug.trace(); return comment; }