Merge branch 'master' into recoverFromOscillations

# Conflicts:
#	distribution/ReleaseNotes.txt
This commit is contained in:
hneemann 2024-01-30 11:14:00 +01:00
commit e97f29550f
2 changed files with 9 additions and 1 deletions

View File

@ -7,6 +7,7 @@ HEAD, planned as v0.31
- Adds drivers with inverted output
- Adds a minified circuit as a new shape for embedded circuits
- Allows recovering from oscillations.
- Supports XDG_CONFIG_HOME environment variable
v0.30, released on 3. February 2023
- Added a search function

View File

@ -37,7 +37,14 @@ public class SettingsBase implements AttributeListener {
protected SettingsBase(List<Key> settingsKeys, String name) {
this.settingsKeys = settingsKeys;
filename = new File(new File(System.getProperty("user.home")), name);
File defaultSettings = new File(new File(System.getProperty("user.home")), name);
String settingsDir = System.getenv("XDG_CONFIG_HOME");
if (defaultSettings.isFile() || settingsDir == null) {
filename = defaultSettings;
} else {
filename = new File(settingsDir, name);
}
ElementAttributes attr = null;
if (filename.exists()) {