From 5523518c1d9a94578f1aeb53d38220579224188f Mon Sep 17 00:00:00 2001 From: j-dimension Date: Fri, 2 Aug 2024 00:04:04 +0200 Subject: [PATCH] automatically focus "page backward" button when reaching last page of document. issue #2456 --- .../editors/documents/viewer/PdfImageScrollingPanel.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/documents/viewer/PdfImageScrollingPanel.java b/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/documents/viewer/PdfImageScrollingPanel.java index c2abf93a4..efa13f449 100644 --- a/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/documents/viewer/PdfImageScrollingPanel.java +++ b/j-lawyer-client/src/com/jdimension/jlawyer/client/editors/documents/viewer/PdfImageScrollingPanel.java @@ -793,6 +793,10 @@ private void setCurrentPage(int pageIndex) { cmdPageBackward.setEnabled(currentPage > 0); cmdLastPage.setEnabled((currentPage + 1) < renderedPages); cmdPageForward.setEnabled((currentPage + 1) < renderedPages); + + if(!this.cmdPageForward.isEnabled()) { + this.cmdPageBackward.requestFocus(); + } } /**