From 5c9df5a85739bd15b2cf769f6b825eb6e9092d65 Mon Sep 17 00:00:00 2001 From: Christoph Date: Tue, 20 Dec 2022 19:23:44 +0100 Subject: [PATCH] Fix remember last open valid library with empty new one (#9489) --- 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()));