summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit/pdfover/gui
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/Status.java17
1 files changed, 7 insertions, 10 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/Status.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/Status.java
index 3b03de78..3920b4d7 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/Status.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/Status.java
@@ -57,21 +57,18 @@ public class Status {
return this.currentState;
}
- public void setCurrentState(State currentState) {
- log.debug("Changing from " + this.currentState + " to " + currentState);
+ public void setCurrentState(State newState) {
+ log.debug("Changing from " + currentState + " to " + newState);
- if (this.previousState != this.currentState)
+ if ((previousState != null) && (previousState != currentState) && (previousState != newState))
{
// Reference to previous state will be lost - perform cleanup
- if (this.previousState != null)
- {
- log.debug("Cleaning up " + this.previousState);
- this.previousState.cleanUp();
- }
+ log.debug("Cleaning up " + previousState);
+ previousState.cleanUp();
}
- this.previousState = this.currentState;
- this.currentState = currentState;
+ this.previousState = currentState;
+ this.currentState = newState;
}
public State getPreviousState() {