mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Don't bail out of saving settings if there is no case open
This commit is contained in:
parent
df912db421
commit
94bdd86840
@ -203,17 +203,20 @@ final class ImageGalleryOptionsPanel extends javax.swing.JPanel {
|
||||
}
|
||||
|
||||
void store() {
|
||||
Case openCase;
|
||||
try {
|
||||
openCase = Case.getCurrentCaseThrows();
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
Logger.getLogger(ImageGalleryOptionsPanel.class.getName()).log(Level.SEVERE, "Exception while getting open case.", ex); //NON-NLS
|
||||
return;
|
||||
}
|
||||
ImageGalleryPreferences.setEnabledByDefault(enabledByDefaultBox.isSelected());
|
||||
ImageGalleryController.getDefault().setListeningEnabled(enabledForCaseBox.isSelected());
|
||||
new PerCaseProperties(openCase).setConfigSetting(ImageGalleryModule.getModuleName(), PerCaseProperties.ENABLED, Boolean.toString(enabledForCaseBox.isSelected()));
|
||||
ImageGalleryPreferences.setGroupCategorizationWarningDisabled(groupCategorizationWarningBox.isSelected());
|
||||
|
||||
// If a case is open, save the per case setting
|
||||
try {
|
||||
Case openCase = Case.getCurrentCaseThrows();
|
||||
new PerCaseProperties(openCase).setConfigSetting(ImageGalleryModule.getModuleName(), PerCaseProperties.ENABLED, Boolean.toString(enabledForCaseBox.isSelected()));
|
||||
} catch (NoCurrentCaseException ex) {
|
||||
// It's not an error if there's no case open
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user