From 8763fe0a49cfd1d2c8b61cb66708a59b3788fe31 Mon Sep 17 00:00:00 2001 From: Raphael Jolly Date: Thu, 31 May 2018 17:33:02 +0200 Subject: [PATCH] empty --- pdfview/src/linoleum/pdfview/PDFViewer.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pdfview/src/linoleum/pdfview/PDFViewer.java b/pdfview/src/linoleum/pdfview/PDFViewer.java index 5ee33b04..f8ddc600 100644 --- a/pdfview/src/linoleum/pdfview/PDFViewer.java +++ b/pdfview/src/linoleum/pdfview/PDFViewer.java @@ -34,6 +34,7 @@ public class PDFViewer extends FileSupport { private String docName; private PagePreparer pagePrep; private PagePanel page; + private URI prev; private class OpenAction extends AbstractAction { public OpenAction() { @@ -43,7 +44,8 @@ public OpenAction() { @Override public void actionPerformed(final ActionEvent e) { - getApplicationManager().get("Files").open(getURI(), getDesktopPane()); + final URI uri = getURI(); + getApplicationManager().get("Files").open(uri == null?prev:uri, getDesktopPane()); } } @@ -79,6 +81,12 @@ public Frame getFrame() { return new PDFViewer(); } + @Override + public void setURI(final URI uri) { + prev = getURI(); + super.setURI(uri); + } + @Override protected void open() { final URI uri = getURI();