diff --git a/AugendiagnoseFX/src/de/eisfeldj/augendiagnosefx/controller/DisplayImageHolderController.java b/AugendiagnoseFX/src/de/eisfeldj/augendiagnosefx/controller/DisplayImageHolderController.java index 7e8af1ef..0fe0ad0f 100644 --- a/AugendiagnoseFX/src/de/eisfeldj/augendiagnosefx/controller/DisplayImageHolderController.java +++ b/AugendiagnoseFX/src/de/eisfeldj/augendiagnosefx/controller/DisplayImageHolderController.java @@ -50,6 +50,12 @@ public final void initialize(final URL location, final ResourceBundle resources) mBody.getChildren().add(mController.getRoot()); } + @Override + public final void close() { + mController.close(); + super.close(); + } + /** * Checks if narrow display is required. * diff --git a/AugendiagnoseFX/src/de/eisfeldj/augendiagnosefx/controller/DisplayImagePairController.java b/AugendiagnoseFX/src/de/eisfeldj/augendiagnosefx/controller/DisplayImagePairController.java index 26988fbc..d9741acb 100644 --- a/AugendiagnoseFX/src/de/eisfeldj/augendiagnosefx/controller/DisplayImagePairController.java +++ b/AugendiagnoseFX/src/de/eisfeldj/augendiagnosefx/controller/DisplayImagePairController.java @@ -44,6 +44,13 @@ public final boolean isDirty() { public final void initialize(final URL location, final ResourceBundle resources) { } + @Override + public final void close() { + mControllerRight.close(); + mControllerLeft.close(); + super.close(); + } + /** * Setter for the eye photo pair. Initializes the view. * diff --git a/AugendiagnoseFX/src/de/eisfeldj/augendiagnosefx/controller/MainController.java b/AugendiagnoseFX/src/de/eisfeldj/augendiagnosefx/controller/MainController.java index 3172be54..28407673 100644 --- a/AugendiagnoseFX/src/de/eisfeldj/augendiagnosefx/controller/MainController.java +++ b/AugendiagnoseFX/src/de/eisfeldj/augendiagnosefx/controller/MainController.java @@ -280,7 +280,7 @@ public final void addSubPage(final BaseController controller, final int paneInde mSubPageRegistry.add(controller); } else { - position = unclosablePages(); + position = unclosablePagesCount(); mSubPageRegistry.add(position, controller); } @@ -394,7 +394,7 @@ private void disableClose(final int position) { * @return true if there is a page that can be closed. */ public final boolean hasClosablePage() { - return mSubPageRegistry.size() > unclosablePages(); + return mSubPageRegistry.size() > unclosablePagesCount(); } /** @@ -402,7 +402,7 @@ public final boolean hasClosablePage() { * * @return the number of unclosable pages. */ - private int unclosablePages() { + private int unclosablePagesCount() { int counter = 0; for (BaseController controller : mSubPageRegistry) { if (!controller.isCloseable()) { diff --git a/AugendiagnoseFX/src/de/eisfeldj/augendiagnosefx/fxelements/SizableImageView.java b/AugendiagnoseFX/src/de/eisfeldj/augendiagnosefx/fxelements/SizableImageView.java index 810a73dd..10a37f0f 100644 --- a/AugendiagnoseFX/src/de/eisfeldj/augendiagnosefx/fxelements/SizableImageView.java +++ b/AugendiagnoseFX/src/de/eisfeldj/augendiagnosefx/fxelements/SizableImageView.java @@ -277,7 +277,6 @@ public final void setEyePhoto(final EyePhoto eyePhoto) { this.mEyePhoto = eyePhoto; Image image = eyePhoto.getImage(Resolution.NORMAL); - if (image.getProgress() == 1) { // image is already loaded from the start. Platform.runLater(new Runnable() { diff --git a/AugendiagnoseFX/src/de/eisfeldj/augendiagnosefx/util/imagefile/EyePhoto.java b/AugendiagnoseFX/src/de/eisfeldj/augendiagnosefx/util/imagefile/EyePhoto.java index 0cab22af..59a5d268 100644 --- a/AugendiagnoseFX/src/de/eisfeldj/augendiagnosefx/util/imagefile/EyePhoto.java +++ b/AugendiagnoseFX/src/de/eisfeldj/augendiagnosefx/util/imagefile/EyePhoto.java @@ -27,7 +27,7 @@ public class EyePhoto { /** * The maximum size of the image cache. */ - private static final int MAX_IMAGE_CACHE = 3; + private static final int MAX_IMAGE_CACHE = 4; /** * Indicator if the file has already a formatted name.