From fa361ce02d1252486cce978e8e8a7763794b2155 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Tue, 18 Feb 2020 13:50:59 +0100 Subject: comments added --- .../java/at/asit/pdfover/gui/workflow/states/OpenState.java | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'pdf-over-gui/src/main/java') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java index b9aa961d..147e2399 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OpenState.java @@ -111,13 +111,11 @@ public class OpenState extends State { // scan for signature placeholders // - see if we want to scan for placeholders in the settings if (getStateMachine().getConfigProvider().getEnablePlaceholderUsage()) { - // getStateMachine().getConfigProvider().getUseMarker() || - // getStateMachine().getConfigProvider().getUseSignatureFields()) { try { - // - scan for placeholders PDDocument pddocument = PDDocument.load(getStateMachine().getStatus().getDocument()); + //first check the signature fields placeholder if (getStateMachine().getConfigProvider().getUseSignatureFields()) { List fields = SignatureFieldsExtractor.findEmptySignatureFields(pddocument); @@ -149,14 +147,13 @@ public class OpenState extends State { } getStateMachine().getStatus().setSearchForPlaceholderSignature(false); - } } else { getStateMachine().getStatus().setSearchForPlaceholderSignature(false); } } - + // second check if qr code placeholder search is enabled } else if (getStateMachine().getConfigProvider().getUseMarker()) { SignaturePlaceholderData signaturePlaceholderData = SignaturePlaceholderExtractor @@ -205,14 +202,10 @@ public class OpenState extends State { // proceed with the usual process. } } - + this.setNextState(new PositioningState(getStateMachine())); } - - - - /** * The selected placeholder is added to the configuration file * @param selection -- cgit v1.2.3