@@ -86,16 +86,15 @@ public IGVPreferences(Map<String, String> userPreferences,
86
86
public String get (String key ) {
87
87
key = key .trim ();
88
88
89
- if (userPreferences .containsKey (key )) {
89
+ if (userPreferences .containsKey (key )) {
90
90
return userPreferences .get (key );
91
- }
92
- else if (defaults != null && defaults .containsKey (key )) {
91
+ } else if (parent != null && parent .userPreferences .containsKey (key )) {
92
+ return parent .userPreferences .get (key );
93
+ } else if (defaults != null && defaults .containsKey (key )) {
93
94
return defaults .get (key );
94
- }
95
- else if (parent != null ) {
95
+ } else if (parent != null ) {
96
96
return parent .get (key );
97
- }
98
- else {
97
+ } else {
99
98
return null ;
100
99
}
101
100
}
@@ -104,6 +103,7 @@ else if(parent != null) {
104
103
/**
105
104
* Return preference with given key and specified default value. If key is not present defaultValue is returned,
106
105
* no search through defaults or hierarchy is performed.
106
+ *
107
107
* @param key
108
108
* @param defaultValue
109
109
* @return
@@ -115,7 +115,6 @@ public String get(String key, String defaultValue) {
115
115
}
116
116
117
117
118
-
119
118
/**
120
119
* Return the preference as a boolean value.
121
120
*
@@ -243,10 +242,9 @@ public void addOverrides(Map<String, String> newPrefs) {
243
242
244
243
public boolean getAntiAliasing () {
245
244
246
- if (userPreferences .containsKey (Constants .ENABLE_ANTIALISING ) || Globals .IS_LINUX == false ) {
245
+ if (userPreferences .containsKey (Constants .ENABLE_ANTIALISING ) || Globals .IS_LINUX == false ) {
247
246
return getAsBoolean (Constants .ENABLE_ANTIALISING );
248
- }
249
- else {
247
+ } else {
250
248
// Linux with no explicit setting
251
249
return false ;
252
250
}
@@ -792,7 +790,7 @@ private PaletteColorTable getLegacyMutationColorScheme() {
792
790
}
793
791
794
792
static String getMutationColorKey (String type ) {
795
- switch (type ) {
793
+ switch (type ) {
796
794
case "Indel" :
797
795
return MUTATION_INDEL_COLOR_KEY ;
798
796
case "Missense" :
@@ -934,6 +932,6 @@ public void print(PrintWriter pw) {
934
932
pw .println (entry .getValue ());
935
933
}
936
934
}
937
-
935
+
938
936
939
937
}
0 commit comments