From c096631939f7ac429a749afb38628bef85edb557 Mon Sep 17 00:00:00 2001 From: Alessio Gazzara <81399617+ZodGaz@users.noreply.github.com> Date: Sat, 5 Jul 2025 16:39:26 +0200 Subject: [PATCH 1/3] Fix issue #13382, that was probably related to the cleanup logic in GroupTreeViewModel not being triggered properly. Setting the activeDatabase to null when the last LibraryTab is closed seems to fix the issue. --- jabgui/src/main/java/org/jabref/gui/frame/JabRefFrame.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jabgui/src/main/java/org/jabref/gui/frame/JabRefFrame.java b/jabgui/src/main/java/org/jabref/gui/frame/JabRefFrame.java index 3fa13641fb7..4e3368ed2d3 100644 --- a/jabgui/src/main/java/org/jabref/gui/frame/JabRefFrame.java +++ b/jabgui/src/main/java/org/jabref/gui/frame/JabRefFrame.java @@ -595,6 +595,10 @@ public boolean closeTabs(@NonNull List tabs) { // Trigger org.jabref.gui.LibraryTab.onClosed Event.fireEvent(libraryTab, new Event(this, libraryTab, Tab.CLOSED_EVENT)); } + // Force group update in the GroupTreeViewModel when all the libraries are closed + if (tabbedPane.getTabs().isEmpty()) { + stateManager.setActiveDatabase(null); + } return true; } From 81bf242e031b2acbd89cc6cd10debd8b93dca955 Mon Sep 17 00:00:00 2001 From: Alessio Gazzara <81399617+ZodGaz@users.noreply.github.com> Date: Mon, 7 Jul 2025 18:49:31 +0200 Subject: [PATCH 2/3] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca6ab160c7d..48282fec07b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -76,6 +76,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv - We fixed an issue where Document Viewer showed technical exceptions when opening entries with non-PDF files. [#13198](https://github.com/JabRef/jabref/issues/13198) - When creating a library, if you drag a PDF file containing only a single column, the dialog will now automatically close. [#13262](https://github.com/JabRef/jabref/issues/13262) - We fixed an issue where the tab showing the fulltext search results would appear blank after switching library. [#13241](https://github.com/JabRef/jabref/issues/13241) +- We fixed an issue where the groups were still displayed after closing all libraries. [#13382](https://github.com/JabRef/jabref/issues/13382) ### Removed From e7bad6bc0527596eb65e975b47d36206f425213e Mon Sep 17 00:00:00 2001 From: Alessio Gazzara <81399617+ZodGaz@users.noreply.github.com> Date: Wed, 16 Jul 2025 14:39:46 +0200 Subject: [PATCH 3/3] Fix title bar DB name and an uncaught exception - Fixed issue where the database name remained in the title bar after closing all databases. - Fixed exception triggered by action "Close all" when the welcome tab was open. --- jabgui/src/main/java/org/jabref/gui/frame/JabRefFrame.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jabgui/src/main/java/org/jabref/gui/frame/JabRefFrame.java b/jabgui/src/main/java/org/jabref/gui/frame/JabRefFrame.java index 4e3368ed2d3..d542d5dd1de 100644 --- a/jabgui/src/main/java/org/jabref/gui/frame/JabRefFrame.java +++ b/jabgui/src/main/java/org/jabref/gui/frame/JabRefFrame.java @@ -419,7 +419,6 @@ private void initBindings() { .noneMatch(ltab -> ((LibraryTab) ltab).getBibDatabaseContext().getUid().equals(activeUID)); if (wasClosed) { tabbedPane.getSelectionModel().selectNext(); - return; } } @@ -726,6 +725,7 @@ private class CloseAllDatabaseAction extends SimpleCommand { @Override public void execute() { + tabbedPane.getTabs().removeIf(t -> t instanceof WelcomeTab); for (Tab tab : tabbedPane.getTabs()) { Platform.runLater(() -> closeTab((LibraryTab) tab)); }