Skip to content

Commit

Permalink
empty
Browse files Browse the repository at this point in the history
  • Loading branch information
rjolly committed May 31, 2018
1 parent dc30dd8 commit 8763fe0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pdfview/src/linoleum/pdfview/PDFViewer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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());
}
}

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 8763fe0

Please sign in to comment.