X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FPreferences.java;h=94f67f616c458c712118b3fe25074ff7a1682cb5;hb=1b8304d543a0beb003842903ce3a662d4bbe37a7;hp=b04c3bcac02e69a5be7f17775bd284af16e5c4dd;hpb=b419d3b17606d478c234678487ff34d97bfa83cc;p=jalview.git diff --git a/src/jalview/gui/Preferences.java b/src/jalview/gui/Preferences.java index b04c3bc..94f67f6 100755 --- a/src/jalview/gui/Preferences.java +++ b/src/jalview/gui/Preferences.java @@ -844,24 +844,28 @@ public class Preferences extends GPreferences * Save Backups settings */ Cache.applicationProperties.setProperty(BackupFiles.ENABLED, - Boolean.toString(enableBackupFiles.isSelected())); - int preset = getComboIntStringKey(backupfilesPresetsCombo); - Cache.applicationProperties.setProperty(BackupFiles.NS + "_PRESET", Integer.toString(preset)); - - if (preset == BackupFilesPresetEntry.BACKUPFILESSCHEMECUSTOM) + Platform.isJS() ? Boolean.FALSE.toString() + : Boolean.toString(enableBackupFiles.isSelected())); + if (!Platform.isJS()) { - BackupFilesPresetEntry customBFPE = getBackupfilesCurrentEntry(); - BackupFilesPresetEntry.backupfilesPresetEntriesValues.put( - BackupFilesPresetEntry.BACKUPFILESSCHEMECUSTOM, customBFPE); - Cache.applicationProperties - .setProperty(BackupFilesPresetEntry.CUSTOMCONFIG, - customBFPE.toString()); - } + int preset = getComboIntStringKey(backupfilesPresetsCombo); + Cache.applicationProperties.setProperty(BackupFiles.NS + "_PRESET", + Integer.toString(preset)); - BackupFilesPresetEntry savedBFPE = BackupFilesPresetEntry.backupfilesPresetEntriesValues - .get(preset); - Cache.applicationProperties.setProperty( - BackupFilesPresetEntry.SAVEDCONFIG, savedBFPE.toString()); + if (preset == BackupFilesPresetEntry.BACKUPFILESSCHEMECUSTOM) + { + BackupFilesPresetEntry customBFPE = getBackupfilesCurrentEntry(); + BackupFilesPresetEntry.backupfilesPresetEntriesValues.put( + BackupFilesPresetEntry.BACKUPFILESSCHEMECUSTOM, customBFPE); + Cache.applicationProperties.setProperty( + BackupFilesPresetEntry.CUSTOMCONFIG, customBFPE.toString()); + } + + BackupFilesPresetEntry savedBFPE = BackupFilesPresetEntry.backupfilesPresetEntriesValues + .get(preset); + Cache.applicationProperties.setProperty( + BackupFilesPresetEntry.SAVEDCONFIG, savedBFPE.toString()); + } Cache.saveProperties(); Desktop.instance.doConfigureStructurePrefs();