Skip to content

Commit

Permalink
Readd empty group hits display (#10534)
Browse files Browse the repository at this point in the history
Fixes #9972
  • Loading branch information
Siedlerchr authored Oct 21, 2023
1 parent 1da8ede commit c5c6455
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
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

0 comments on commit c5c6455

Please sign in to comment.