fixed ambiguous naming of positionRelation() method

the bottom method now just returns the alpabetically sorted one and passes that as an argument to the other method which expects a sorted list of relations
This commit is contained in:
Bjorn Pijnacker 2021-02-27 19:54:12 +01:00
parent d238c521ea
commit ecd5a0b8fc
No known key found for this signature in database
GPG Key ID: 68CC60CD9AC50D72
1 changed files with 3 additions and 3 deletions

View File

@ -59,7 +59,7 @@ public class AutoPositionAction extends AbstractAction {
0);
if (choice == null) return;
if (choice.equals(choices[0])) {
positionRelation();
positionRelations(getAlphabeticRelationList());
} else if (choice.equals(choices[1])) {
JOptionPane.showConfirmDialog(
null,
@ -95,9 +95,9 @@ public class AutoPositionAction extends AbstractAction {
/**
* Creates an orderList by grabbing all relations and sorting them
*/
private void positionRelation() {
private ArrayList<Relation> getAlphabeticRelationList() {
ArrayList<Relation> relationList = new ArrayList<>(model.getRelations());
Collections.sort(relationList);
positionRelations(relationList);
return relationList;
}
}