Skip to content

Commit

Permalink
Merge branch 'sdo/fixModelOrderPortCalculation' into sdo/mwr-mt
Browse files Browse the repository at this point in the history
  • Loading branch information
soerendomroes committed Aug 16, 2024
2 parents 3bd6121 + e4b1d04 commit 939c826
Showing 1 changed file with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,16 +215,20 @@ public int compare(final LNode n1, final LNode n2) {
}
// Order nodes by their order in the model.
// This is also the fallback case if one of the nodes is not connected to the previous layer.
int n1ModelOrder = n1.getProperty(InternalProperties.MODEL_ORDER);
int n2ModelOrder = n2.getProperty(InternalProperties.MODEL_ORDER);
if (n1ModelOrder > n2ModelOrder) {
updateBiggerAndSmallerAssociations(n1, n2);
if (n1.hasProperty(InternalProperties.MODEL_ORDER) && n2.hasProperty(InternalProperties.MODEL_ORDER)) {
int n1ModelOrder = n1.getProperty(InternalProperties.MODEL_ORDER);
int n2ModelOrder = n2.getProperty(InternalProperties.MODEL_ORDER);
if (n1ModelOrder > n2ModelOrder) {
updateBiggerAndSmallerAssociations(n1, n2);
} else {
updateBiggerAndSmallerAssociations(n2, n1);
}
return Integer.compare(
n1ModelOrder,
n2ModelOrder);
} else {
updateBiggerAndSmallerAssociations(n2, n1);
return 0;
}
return Integer.compare(
n1ModelOrder,
n2ModelOrder);
}

/**
Expand Down

0 comments on commit 939c826

Please sign in to comment.