Skip to content

Commit

Permalink
Fix #4033: order of fields in customized entry types is saved correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasdiez committed Jun 13, 2018
1 parent a094ea4 commit 2f18ad5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `#
- We fixed an issue where the custom file column were sorted incorrectly. https://github.com/JabRef/jabref/issues/3119
- We fixed an issues where the entry losses focus when a field is edited and at the same time used for sorting. https://github.com/JabRef/jabref/issues/3373
- We fixed an issue where the menu on Mac OS was not displayed in the usual Mac-specific way. https://github.com/JabRef/jabref/issues/3146
- We fixed an issue where the order of fields in customized entry types was not saved correctly. [#4033](http://github.com/JabRef/jabref/issues/4033)
- We fixed an issue where the groups tree of the last database was still shown even after the database was already closed.
- We fixed an issue where the "Open file dialog" may disappear behind other windows. https://github.com/JabRef/jabref/issues/3410
- We fixed an issue where the default icon of a group was not colored correctly.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
Expand Down Expand Up @@ -276,11 +277,13 @@ private void applyChanges() {
if (biblatexMode) {
Set<String> oldPrimaryOptionalFieldsLists = oldType.get().getPrimaryOptionalFields();
Set<String> oldSecondaryOptionalFieldsList = oldType.get().getSecondaryOptionalFields();
if (oldRequiredFieldsList.equals(requiredFieldsList) && oldPrimaryOptionalFieldsLists.equals(optionalFieldsList) &&
oldSecondaryOptionalFieldsList.equals(secondaryOptionalFieldsLists)) {
if (Arrays.equals(oldRequiredFieldsList.toArray(), requiredFieldsList.toArray())
&& Arrays.equals(oldPrimaryOptionalFieldsLists.toArray(), optionalFieldsList.toArray())
&& Arrays.equals(oldSecondaryOptionalFieldsList.toArray(), secondaryOptionalFieldsLists.toArray())) {
changesMade = false;
}
} else if (oldRequiredFieldsList.equals(requiredFieldsList) && oldOptionalFieldsList.equals(optionalFieldsList)) {
} else if (Arrays.equals(oldRequiredFieldsList.toArray(), requiredFieldsList.toArray())
&& Arrays.equals(oldOptionalFieldsList.toArray(), optionalFieldsList.toArray())) {
changesMade = false;
}
}
Expand Down

0 comments on commit 2f18ad5

Please sign in to comment.