From d55e7fff28e7fd57736ffa0a1db1858b5f3820b7 Mon Sep 17 00:00:00 2001 From: Siedlerchr Date: Tue, 20 Dec 2022 16:51:26 +0100 Subject: [PATCH] Fix remember last open valid library with empty new one Fixes part of #9190 --- CHANGELOG.md | 2 +- src/main/java/org/jabref/preferences/JabRefPreferences.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98202f7f7b0..e976bf93ed0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,7 +28,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve ### Fixed - The tab "deprecated fields" is shown in biblatex-mode only. [#7757](https://github.com/JabRef/jabref/issues/7757) - +- We fixed an issue where the last opened libraries were not remembered when a new unsaved libray was open as well [#9190](https://github.com/JabRef/jabref/issues/9190) ### Removed diff --git a/src/main/java/org/jabref/preferences/JabRefPreferences.java b/src/main/java/org/jabref/preferences/JabRefPreferences.java index 193b55e7340..ff0cb73e4dc 100644 --- a/src/main/java/org/jabref/preferences/JabRefPreferences.java +++ b/src/main/java/org/jabref/preferences/JabRefPreferences.java @@ -2563,7 +2563,7 @@ public GuiPreferences getGuiPreferences() { if (newValue != null) { put(LAST_FOCUSED, newValue.toAbsolutePath().toString()); } else { - remove(LAST_EDITED); + remove(LAST_FOCUSED); } }); guiPreferences.getFileHistory().addListener((InvalidationListener) change -> storeFileHistory(guiPreferences.getFileHistory()));