Skip to content
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

Readd empty group hits display #10534

Merged
merged 1 commit into from
Oct 21, 2023
Merged
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 @@ -34,6 +34,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
- The ISI importer uses the field `comment` for notes (instead of `review). [#10478](https://github.com/JabRef/jabref/pull/10478)
- If no existing document is selected for exporting "Embedded BibTeX pdf" JabRef will now create a new PDF file with a sample text and the metadata. [#10101](https://github.com/JabRef/jabref/issues/10101)
- Translated titles format no longer raise a warning. [#10459](https://github.com/JabRef/jabref/issues/10459)
- We re-added the empty grey containers in the groups panel to keep an indicator for the current selected group, if displaying of group item count is turned off [#9972](https://github.com/JabRef/jabref/issues/9972)

### Fixed

Expand Down
4 changes: 1 addition & 3 deletions src/main/java/org/jabref/gui/groups/GroupTreeView.java
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ private StackPane getArrowCell(GroupNodeViewModel viewModel) {

private StackPane createNumberCell(GroupNodeViewModel group) {
final StackPane node = new StackPane();
node.getStyleClass().add("hits");
if (!group.isRoot()) {
BindingsHelper.includePseudoClassWhen(node, PSEUDOCLASS_ANYSELECTED,
group.anySelectedEntriesMatchedProperty());
Expand All @@ -287,10 +288,7 @@ private StackPane createNumberCell(GroupNodeViewModel group) {
text.setText("");
}

node.getStyleClass().clear();

if (shouldDisplayGroupCount) {
node.getStyleClass().add("hits");
text.textProperty().bind(group.getHits().map(Number::intValue).map(this::getFormattedNumber));
Tooltip tooltip = new Tooltip();
tooltip.textProperty().bind(group.getHits().asString());
Expand Down