Also add table information to window ignoring

This commit is contained in:
SiboVG 2023-04-04 00:14:59 +02:00
parent 6a54e97fb4
commit 86b277e9cb
2 changed files with 4 additions and 3 deletions

View File

@ -32,7 +32,6 @@ import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
import java.util.function.BiPredicate;
import java.util.prefs.BackingStoreException;
import java.util.prefs.Preferences;
@ -54,6 +53,7 @@ public abstract class PreferencesExporter {
if (!prefs.getExportWindowInformation()) {
nodesToIgnore.add(SwingPreferences.NODE_WINDOWS);
nodesToIgnore.add(SwingPreferences.NODE_TABLES);
}
}

View File

@ -41,6 +41,7 @@ public class SwingPreferences extends net.sf.openrocket.startup.Preferences {
public static final String NODE_WINDOWS = "windows";
public static final String NODE_TABLES = "tables";
private static final List<Locale> SUPPORTED_LOCALES;
static {
@ -441,7 +442,7 @@ public class SwingPreferences extends net.sf.openrocket.startup.Preferences {
}
public Integer getTableColumnWidth(String keyName, int columnIdx) {
String pref = PREFNODE.node("tables").get(
String pref = PREFNODE.node(NODE_TABLES).get(
"cw." + keyName + "." + columnIdx, null);
if (pref == null)
return null;
@ -459,7 +460,7 @@ public class SwingPreferences extends net.sf.openrocket.startup.Preferences {
}
public void setTableColumnWidth(String keyName, int columnIdx, Integer width) {
PREFNODE.node("tables").put(
PREFNODE.node(NODE_TABLES).put(
"cw." + keyName + "." + columnIdx, width.toString());
storeVersion();
}