summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src
diff options
context:
space:
mode:
authorAndreas Abraham <andreas.abraham@egiz.gv.at>2020-11-23 16:46:08 +0100
committerAndreas Abraham <andreas.abraham@egiz.gv.at>2020-11-23 16:46:08 +0100
commited09587d97f451d8ab00fc20212011b3c5d35f0c (patch)
tree68c93c6b48cf4368f568d501a3a5fff76ffcf285 /pdf-over-gui/src
parent9fead182dd9bc31ac532028abd436ab84069b097 (diff)
downloadpdf-over-ed09587d97f451d8ab00fc20212011b3c5d35f0c.tar.gz
pdf-over-ed09587d97f451d8ab00fc20212011b3c5d35f0c.tar.bz2
pdf-over-ed09587d97f451d8ab00fc20212011b3c5d35f0c.zip
Improved code
Diffstat (limited to 'pdf-over-gui/src')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java3
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java7
2 files changed, 5 insertions, 5 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java
index 10be1500..8fd94eb7 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java
@@ -243,9 +243,6 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
@Override
public void widgetSelected(SelectionEvent e) {
Profile current = SimpleConfigurationComposite.this.configurationContainer.getSignatureProfile();
- //Profile selected = Profile.getProfileByIndex(SimpleConfigurationComposite.this.cmbSignatureProfiles
- // .getSelectionIndex());
- //TODO to test
int index = SimpleConfigurationComposite.this.cmbSignatureProfiles.getSelectionIndex();
Profile selected = Profile.values()[index];
if (!current.equals(selected)) {
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java
index a7e6592c..036154ab 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java
@@ -151,8 +151,11 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
String signatureProfile = config.getProperty(Constants.SIGNATURE_PROFILE);
if (signatureProfile != null) {
- this.configuration.setSignatureProfile(Profile.getProfile(signatureProfile));
- this.configurationOverlay.setSignatureProfile(Profile.getProfile(signatureProfile));
+ Profile profile = Profile.getProfile(signatureProfile);
+ if (profile != null) {
+ this.configuration.setSignatureProfile(profile);
+ this.configurationOverlay.setSignatureProfile(profile);
+ }
}
String compat = config.getProperty(Constants.CFG_SIGNATURE_PDFA_COMPAT);