From ecd5a0b8fc8d5918d3fcec1abb5df9bcc1159069 Mon Sep 17 00:00:00 2001 From: Bjorn Pijnacker Date: Sat, 27 Feb 2021 19:54:12 +0100 Subject: [PATCH] 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 --- .../erme/control/actions/AutoPositionAction.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/nl/andrewlalis/erme/control/actions/AutoPositionAction.java b/src/main/java/nl/andrewlalis/erme/control/actions/AutoPositionAction.java index ae1e378..37165a6 100644 --- a/src/main/java/nl/andrewlalis/erme/control/actions/AutoPositionAction.java +++ b/src/main/java/nl/andrewlalis/erme/control/actions/AutoPositionAction.java @@ -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 getAlphabeticRelationList() { ArrayList relationList = new ArrayList<>(model.getRelations()); Collections.sort(relationList); - positionRelations(relationList); + return relationList; } }