|
@@ -128,6 +128,9 @@ public class TopicBar extends JComponent implements ActionListener,
|
128
|
128
|
//}
|
129
|
129
|
((DefaultStyledDocument) topicText.getDocument()).setDocumentFilter(
|
130
|
130
|
new NewlinesDocumentFilter());
|
|
131
|
+ setAttributes();
|
|
132
|
+ ((DefaultStyledDocument) topicText.getDocument()).setCharacterAttributes(
|
|
133
|
+ 0, Integer.MAX_VALUE, as, true);
|
131
|
134
|
|
132
|
135
|
topicText.getActionMap().put("paste-from-clipboard",
|
133
|
136
|
new NoNewlinesPasteAction());
|
|
@@ -219,6 +222,9 @@ public class TopicBar extends JComponent implements ActionListener,
|
219
|
222
|
* Topic has changed, update topic.
|
220
|
223
|
*/
|
221
|
224
|
private void topicChanged() {
|
|
225
|
+ if (topicText.isEditable()) {
|
|
226
|
+ return;
|
|
227
|
+ }
|
222
|
228
|
topicText.setText("");
|
223
|
229
|
setAttributes();
|
224
|
230
|
((DefaultStyledDocument) topicText.getDocument()).setCharacterAttributes(
|