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

fix: make fields sorted by lexicographical order #7711

Merged
merged 13 commits into from
May 8, 2021
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,7 @@ Note that this project **does not** adhere to [Semantic Versioning](http://semve
- We fixed an issue where the XMP Importer would incorrectly return an empty default entry when importing pdfs [#6577](https://github.com/JabRef/jabref/issues/6577)
- We fixed an issue where opening the menu 'Library properties' marked the library as modified [#6451](https://github.com/JabRef/jabref/issues/6451)
- We fixed an issue when importing resulted in an exception [#7343](https://github.com/JabRef/jabref/issues/7343)
- We fixed an issue where the field in the Field formatter dropdown selection were sorted in random order. [#7710](https://github.com/JabRef/jabref/issues/7710)

### Removed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import org.jabref.model.entry.field.Field;
import org.jabref.model.entry.field.FieldFactory;

import java.util.Comparator;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the reviewdog complaint


public class FieldFormatterCleanupsPanelViewModel {

private final BooleanProperty cleanupsDisableProperty = new SimpleBooleanProperty();
Expand All @@ -28,6 +30,7 @@ public class FieldFormatterCleanupsPanelViewModel {
private final ObjectProperty<Formatter> selectedFormatterProperty = new SimpleObjectProperty<>();

public FieldFormatterCleanupsPanelViewModel() {
availableFieldsProperty.sort(Comparator.comparing(Field::getDisplayName));
k3KAW8Pnf7mkmdSMPHz27 marked this conversation as resolved.
Show resolved Hide resolved
}

public void resetToRecommended() {
Expand Down