Group tab is now empty when there are no libraries open#13473
Merged
Conversation
…c in GroupTreeViewModel not being triggered properly. Setting the activeDatabase to null when the last LibraryTab is closed seems to fix the issue.
7 tasks
Member
Contributor
Author
- 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.
|
@trag-bot didn't find any issues in the code! ✅✨ |
Siedlerchr
approved these changes
Jul 19, 2025
2 tasks
2 tasks
dcarpentiero
pushed a commit
to dcarpentiero/jabref
that referenced
this pull request
Jul 24, 2025
* Fix issue JabRef#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. * Update CHANGELOG.md * 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. --------- Co-authored-by: Christoph <siedlerkiller@gmail.com>
Siedlerchr
added a commit
that referenced
this pull request
Aug 2, 2025
* upstream/main: Bump jablib/src/main/resources/csl-locales from `3bad433` to `ea1b54f` (#13565) New Crowdin updates (#13562) Add a new field for citation count (#13531) Automatic lookup of DOI at citation relations (#13539) Update dependency com.konghq:unirest-modules-gson to v4.5.0 (#13557) Group tab is now empty when there are no libraries open (#13473)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Closes #13382,
The underlying issue was that the
GroupTreeViewModellistens to changes instateManager.activeDatabaseProperty()and clears the groups only when it becomes empty. However, when the last tab was closed manually (viaCloseDatabaseAction), thestateManagerwas not notified that there were no more open databases, so the groups were never cleared.I initially tried addressing this from inside
GroupTreeViewModel:This initially worked after also clearing groups in the
closeAllDatabaseAction, but would not work with the single close database action.To have the single action having the same behavior, I did this and it worked also for the close all action:
This seems to fix the bug for all the actions (so probably the statemanager was never notified when there was not active tabs), checking there's no tabs open and updating the active database triggering all the UI updates.
Feedback needed.
Also for testing purpose I did a little button in the recent tab menu to open all the recent tabs (visible in the video) , let me know if it's would be a good adding to JabRef and I will push this too.
Steps to test
Screen.Recording.2025-07-05.at.16.08.26.mov
Mandatory checks
CHANGELOG.mddescribed in a way that is understandable for the average user (if change is visible to the user)