From: jsimomaa Date: Mon, 18 May 2020 10:27:12 +0000 (+0300) Subject: Fix district finder search result comparison X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F43%2F4243%2F1;p=simantics%2Fdistrict.git Fix district finder search result comparison gitlab #86 Change-Id: I1d6431c41d3d9cf300a6af47e1f493b5c4be9af1 (cherry picked from commit 733d6a84564945fefe429c5e2a9b23b62444d520) --- diff --git a/org.simantics.district.selection/src/org/simantics/district/selection/ElementSelector.java b/org.simantics.district.selection/src/org/simantics/district/selection/ElementSelector.java index ff978059..6de06ff6 100644 --- a/org.simantics.district.selection/src/org/simantics/district/selection/ElementSelector.java +++ b/org.simantics.district.selection/src/org/simantics/district/selection/ElementSelector.java @@ -648,7 +648,7 @@ public class ElementSelector { // Select sorting direction Comparator> comparator = smallest ? (p1, p2) -> Double.compare(p1.second, p2.second) : - (p1, p2) -> Double.compare(p1.second, p2.second); + (p1, p2) -> Double.compare(p2.second, p1.second); // Get association list to property values List> result2 = elements.stream()