X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FPreferences.java;h=207fcb8f9b32ccbe89e8bd220cf3aca9741d8cfd;hb=76f9992a5fd8e818f8051130e25c6aefb4ef51ad;hp=777ab486b17658d06ee6336ad5c9a3b3afdb3b4e;hpb=05951a61acec617599e9a92828b8a498fab6ae32;p=jalview.git diff --git a/src/jalview/gui/Preferences.java b/src/jalview/gui/Preferences.java index 777ab48..207fcb8 100755 --- a/src/jalview/gui/Preferences.java +++ b/src/jalview/gui/Preferences.java @@ -798,16 +798,17 @@ public class Preferences extends GPreferences protColour.getSelectedItem().toString()); Cache.setPropertyNoSave(DEFAULT_COLOUR_NUC, nucColour.getSelectedItem().toString()); - Cache.setColourProperty(ANNOTATIONCOLOUR_MIN, + Cache.setColourPropertyNoSave(ANNOTATIONCOLOUR_MIN, minColour.getBackground()); - Cache.setColourProperty(ANNOTATIONCOLOUR_MAX, + Cache.setColourPropertyNoSave(ANNOTATIONCOLOUR_MAX, maxColour.getBackground()); /* * Save Overview settings */ - Cache.setColourProperty(GAP_COLOUR, gapColour.getBackground()); - Cache.setColourProperty(HIDDEN_COLOUR, hiddenColour.getBackground()); + Cache.setColourPropertyNoSave(GAP_COLOUR, gapColour.getBackground()); + Cache.setColourPropertyNoSave(HIDDEN_COLOUR, + hiddenColour.getBackground()); Cache.setPropertyNoSave(USE_LEGACY_GAP, Boolean.toString(useLegacyGap.isSelected())); Cache.setPropertyNoSave(SHOW_OV_HIDDEN_AT_START, @@ -1045,7 +1046,8 @@ public class Preferences extends GPreferences } /** - * DOCUMENT ME! + * Opens a file browser, and if a file is chosen, sets its path as the text of + * the 'startup file' text field */ @Override public void startupFileTextfield_mouseClicked() @@ -1065,8 +1067,10 @@ public class Preferences extends GPreferences FileFormatI format = chooser.getSelectedFormat(); if (format != null) { - Cache.setPropertyNoSave("DEFAULT_FILE_FORMAT", - format.getName()); + /* + * saving properties to file is deferred to the 'OK' action + */ + Cache.setPropertyNoSave("DEFAULT_FILE_FORMAT", format.getName()); } startupFileTextfield .setText(chooser.getSelectedFile().getAbsolutePath());