diff --git a/src/org/infinity/gui/StringEditor.java b/src/org/infinity/gui/StringEditor.java index 469209310..4d9a38c10 100644 --- a/src/org/infinity/gui/StringEditor.java +++ b/src/org/infinity/gui/StringEditor.java @@ -818,7 +818,8 @@ protected Void doInBackground() throws Exception { WindowBlocker blocker = new WindowBlocker(StringEditor.this); try { blocker.setBlocked(true); - showEntry(addEntry(new StringTable.StringEntry(null), new StringTable.StringEntry(null), true)); + showEntry(addEntry(new StringTable.StringEntry(null, StringTable.FLAGS_DEFAULT), + new StringTable.StringEntry(null, StringTable.FLAGS_DEFAULT), true)); } finally { blocker.setBlocked(false); } diff --git a/src/org/infinity/util/StringTable.java b/src/org/infinity/util/StringTable.java index 78398a00a..cf50767f3 100644 --- a/src/org/infinity/util/StringTable.java +++ b/src/org/infinity/util/StringTable.java @@ -77,7 +77,7 @@ public String format(String text, int strRef) { /** String entry flag: Available tokens will be resolved */ public static final short FLAGS_HAS_TOKEN = 0x04; /** The default flags value includes all supported bits */ - public static final short FLAGS_DEFAULT = 0x07; + public static final short FLAGS_DEFAULT = FLAGS_HAS_TEXT | FLAGS_HAS_SOUND | FLAGS_HAS_TOKEN; /** Strref start index for virtual strings referenced by ENGINEST.2DA (EE only) */ public static final int STRREF_VIRTUAL = 0xf00000; @@ -1467,6 +1467,10 @@ public StringEntry(StringTable parent) { resetModified(); } + public StringEntry(StringTable parent, short flags) { + this(parent, flags, "", 0, 0, ""); + } + public StringEntry(StringTable parent, short flags, String soundRef, int volume, int pitch, String text) { super(null, null, 0, 4); this.parent = parent;