Skip to content

Group tab is now empty when there are no libraries open #13473

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,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)
- Enhanced field selection logic in the Merge Entries dialog when fetching from DOI to prefer valid years and entry types. [#12549](https://github.com/JabRef/jabref/issues/12549)

### Removed
Expand Down
6 changes: 5 additions & 1 deletion jabgui/src/main/java/org/jabref/gui/frame/JabRefFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,6 @@ private void initBindings() {
.noneMatch(ltab -> ((LibraryTab) ltab).getBibDatabaseContext().getUid().equals(activeUID));
if (wasClosed) {
tabbedPane.getSelectionModel().selectNext();
return;
}
}

Expand Down Expand Up @@ -595,6 +594,10 @@ public boolean closeTabs(@NonNull List<LibraryTab> 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;
}

Expand Down Expand Up @@ -722,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));
}
Expand Down