Try to direct edit texts - unsuccessful.

This commit is contained in:
Jindra Petřík
2025-07-06 14:20:34 +02:00
parent dba9fd702d
commit 07984d5154
20 changed files with 1752 additions and 170 deletions

View File

@@ -167,9 +167,11 @@ public class TextPanel extends JPanel implements TagEditorPanel {
public SearchPanel<TextTag> getSearchPanel() {
return textSearchPanel;
}
public void setText(TextTag textTag) {
this.textTag = textTag;
public void refresh() {
if (this.textTag == null) {
return;
}
String formattedText;
try {
formattedText = textTag.getFormattedText(false).text;
@@ -178,6 +180,11 @@ public class TextPanel extends JPanel implements TagEditorPanel {
}
textValue.setText(formattedText);
}
public void setText(TextTag textTag) {
this.textTag = textTag;
refresh();
textValue.setCaretPosition(0);
setModified(false);
setEditText(false);