Group tab is now empty when there are no libraries open #13473
+6
−1
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
GroupTreeViewModel
listens to changes instateManager.activeDatabaseProperty()
and clears the groups only when it becomes empty. However, when the last tab was closed manually (viaCloseDatabaseAction
), thestateManager
was 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.md
described in a way that is understandable for the average user (if change is visible to the user)